Index: branches/5.2.x/core/kernel/db/dblist.php
===================================================================
diff -u -N -r16032 -r16038
--- branches/5.2.x/core/kernel/db/dblist.php (.../dblist.php) (revision 16032)
+++ branches/5.2.x/core/kernel/db/dblist.php (.../dblist.php) (revision 16038)
@@ -1,6 +1,6 @@
Records = $this->Conn->Query($sql);
if (!$this->Records && ($this->Page > 1)) {
- // no records & page > 1, show 404 page
- trigger_error('Unknown page ' . $this->Page . ' in ' . $this->getPrefixSpecial() . ' list, leading to "404 Not Found"', E_USER_NOTICE);
-
- $this->Application->UrlManager->show404();
+ if ( $this->Application->isAdmin ) {
+ // 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->SetPage(1);
+ $this->Query($force);
+ }
+ else {
+ // no records & page > 1, show 404 page
+ trigger_error('Unknown page ' . $this->Page . ' in ' . $this->getPrefixSpecial() . ' list, leading to "404 Not Found"', E_USER_NOTICE);
+ $this->Application->UrlManager->show404();
+ }
}
$this->SelectedCount = count($this->Records);