Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Model::Get() and SQL::Get() Methods. Looks strange.

SS ✭✭
edited October 2009 in Vanilla 2.0 - 2.8
Some code from controller:
$this->SomeModel->Get('SomeKeyID', 'desc', $Limit, $Offset);

Gdn_Model:

public function Get($OrderFields = '', $OrderDirection = 'asc', $Limit = FALSE, $Offset = FALSE) {
return $this->SQL->Get($this->Name, $OrderFields, $OrderDirection, $Limit, $Offset);
}

SqlDriver:

public function Get($Table = '', $OrderFields = '', $OrderDirection = 'asc', $Limit = FALSE, $PageNumber = FALSE) {
...

Unexpected $PageNumber, $Offset is given.

Comments

  • MarkMark Vanilla Staff
    Nice find!

    @Todd - I think this is going to take a bit of work to fix. I've used $OffSet everywhere else in the app, I think we should stick with offset and get rid of PageNumber. What do you think?
  • SS ✭✭
    Bump. Fix the issue.
  • SS ✭✭
    I like $Offset instead of $PageNumber...
Sign In or Register to comment.