Index: trunk/kernel/include/image.php =================================================================== diff -u -r3330 -r3476 --- trunk/kernel/include/image.php (.../image.php) (revision 3330) +++ trunk/kernel/include/image.php (.../image.php) (revision 3476) @@ -655,8 +655,10 @@ function clsImageList() { + global $objConfig; $this->clsItemCollection(); $this->PerPageVar = "Perpage_Images"; + $this->PerPage = $objConfig->Get($this->PerPageVar); $this->SourceTable = GetTablePrefix()."Images"; $this->classname = "clsImage"; } 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); } Index: trunk/admin/install/upgrades/inportal_upgrade_v1.1.5.sql =================================================================== diff -u --- trunk/admin/install/upgrades/inportal_upgrade_v1.1.5.sql (revision 0) +++ trunk/admin/install/upgrades/inportal_upgrade_v1.1.5.sql (revision 3476) @@ -0,0 +1,3 @@ +INSERT INTO ConfigurationValues (VariableName, VariableValue, ModuleOwner, Section) VALUES ('Perpage_Review', '10', 'In-Portal', ''); + +UPDATE Modules SET Version = '1.1.5' WHERE Name = 'In-Portal'; \ No newline at end of file Index: trunk/kernel/include/itemreview.php =================================================================== diff -u -r3282 -r3476 --- trunk/kernel/include/itemreview.php (.../itemreview.php) (revision 3282) +++ trunk/kernel/include/itemreview.php (.../itemreview.php) (revision 3476) @@ -409,11 +409,13 @@ function clsItemReviewList($id=NULL) { + global $objConfig; $this->clsItemCollection(); $this->classname = "clsItemReview"; $this->SetTable('live',GetTablePrefix().'ItemReview'); - $this->Page = 1; - $this->PerPageVar = "Perpage_Review"; + $this->Page = isset($_GET['lpn']) ? $_GET['lpn'] : 1; + $this->PerPageVar = 'Perpage_Review'; + $this->PerPage = $objConfig->Get($this->PerPageVar); if(isset($id)) $this->itemID=$id; $this->AdminSearchFields = array("ReviewText"); Index: trunk/admin/install/inportal_data.sql =================================================================== diff -u -r3356 -r3476 --- trunk/admin/install/inportal_data.sql (.../inportal_data.sql) (revision 3356) +++ trunk/admin/install/inportal_data.sql (.../inportal_data.sql) (revision 3476) @@ -163,6 +163,7 @@ INSERT INTO ConfigurationValues VALUES ('EmailsL_SortField', 'time_sent', 'In-Portal', ''); INSERT INTO ConfigurationValues VALUES ('Perpage_EmailsL', '20', 'In-Portal', ''); INSERT INTO ConfigurationValues VALUES ('Perpage_CustomData', '20', 'In-Portal', ''); +INSERT INTO ConfigurationValues (VariableName, VariableValue, ModuleOwner, Section) VALUES ('Perpage_Review', '10', 'In-Portal', ''); INSERT INTO ConfigurationValues VALUES ('Search_MinKeyword_Length', '3', 'In-Portal', ''); INSERT INTO ConfigurationValues VALUES ('Users_AllowReset', '180', 'In-Portal:Users', 'in-portal:configure_users'); INSERT INTO ConfigurationValues VALUES ('Email_As_Login', '0', 'In-Portal:Users', 'in-portal:configure_users'); @@ -219,7 +220,7 @@ INSERT INTO ItemTypes VALUES (1, 'In-Portal', 'Category', 'Name', 'CreatedById', NULL, NULL, 'la_ItemTab_Categories', 1, 'admin/category/addcategory.php', 'clsCategory', 'Category'); INSERT INTO ItemTypes VALUES (6, 'In-Portal', 'PortalUser', 'Login', 'PortalUserId', NULL, NULL, '', 0, '', 'clsPortalUser', 'User'); -INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('In-Portal', 'kernel/', 'm', '1.1.4', 1, 0, '', 0, '1054738405'); +INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('In-Portal', 'kernel/', 'm', '1.1.5', 1, 0, '', 0, '1054738405'); INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('CATEGORY.VIEW', 'lu_PermName_Category.View_desc', 'lu_PermName_Category.View_error', 'In-Portal'); INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('CATEGORY.ADD', 'lu_PermName_Category.Add_desc', 'lu_PermName_Category.Add_error', 'In-Portal');