Index: trunk/kernel/include/parseditem.php =================================================================== diff -u -r3471 -r3476 --- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 3471) +++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 3476) @@ -1383,9 +1383,12 @@ $this->adodbConnection->Execute($insert); } - function RefreshPage($page_var) + function RefreshPage($page_var, $total_items) { global $objConfig, $objSession; + + $this->QueryItemCount = $total_items; + if ( (int)GetVar('lpn') > 0) { $this->Page = $_GET['lpn']; @@ -1394,6 +1397,12 @@ { $this->Page = $objConfig->Get($page_var); } + + if ( ($this->Page > $this->GetNumPages($this->PerPage) || $this->Page == 0) && ($this->PerPage != -1) ) + { + $this->Page = 1; + } + $objSession->SetVariable($page_var, $this->Page); }