Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/db/dblist.php
Show First 20 Lines • Show All 511 Lines • ▼ Show 20 Line(s) | |||||
if (!$this->Records && ($this->Page > 1)) { | if (!$this->Records && ($this->Page > 1)) { | ||||
if ( $this->Application->isAdmin ) { | if ( $this->Application->isAdmin ) { | ||||
// no records & page > 1, try to reset to 1st page (works only when list in not counted before) | // no records & page > 1, try to reset to 1st page (works only when list in not counted before) | ||||
$this->Application->StoreVar($this->getPrefixSpecial() . '_Page', 1, true); | $this->Application->StoreVar($this->getPrefixSpecial() . '_Page', 1, true); | ||||
$this->SetPage(1); | $this->SetPage(1); | ||||
$this->Query($force); | $this->Query($force); | ||||
} | } | ||||
else if ( $this->Application->HttpQuery->refererIsOurSite() ) { | |||||
// no records & page > 1, try to reset to last page | |||||
$this->SetPage($this->GetTotalPages()); | |||||
$this->Query($force); | |||||
} | |||||
else { | else { | ||||
// no records & page > 1, show 404 page | // no records & page > 1, show 404 page | ||||
trigger_error('Unknown page <strong>' . $this->Page . '</strong> in <strong>' . $this->getPrefixSpecial() . '</strong> list, leading to "404 Not Found"', E_USER_NOTICE); | trigger_error('Unknown page <strong>' . $this->Page . '</strong> in <strong>' . $this->getPrefixSpecial() . '</strong> list, leading to "404 Not Found"', E_USER_NOTICE); | ||||
$this->Application->UrlManager->show404(); | $this->Application->UrlManager->show404(); | ||||
} | } | ||||
} | } | ||||
$this->SelectedCount = count($this->Records); | $this->SelectedCount = count($this->Records); | ||||
▲ Show 20 Lines • Show All 1246 Lines • Show Last 20 Lines |