Index: trunk/kernel/include/parseditem.php
===================================================================
diff -u -r1134 -r1135
--- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 1134)
+++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 1135)
@@ -1565,6 +1565,7 @@
function Query_Item($sql,$limit = null, $fix_method = 'set_first')
{
+ global $n_var_list;
// query itemlist (module items) using $sql specified
// apply direct limit clause ($limit) or calculate it if not specified
// fix invalid page in case if needed by method specified in $fix_method
@@ -1577,6 +1578,10 @@
{
//echo "page fix pre (class: ".get_class($this).")
";
$this->QueryItemCount = QueryCount($sql); // must get total item count before fixing
+ if ($n_var_list['p'])
+ {
+ $fix_method = 'set_current';
+ }
$this->FixInvalidPage($fix_method);
// specially made for cats delete
@@ -1638,6 +1643,7 @@
function FixInvalidPage($fix_method = 'set_first')
{
+ global $n_var_list;
// in case if current page > total page count,
// then set current page to last possible "set_last"
// or first possible "set_first"
@@ -1662,6 +1668,10 @@
$this->Page = $NumPages;
//echo "Move 2 Last (class ".get_class($this).")
";
break;
+ case 'set_current':
+ $this->Page = $n_var_list['p'];
+ //echo "Move 2 Page reflected in env (class ".get_class($this).")
";
+ break;
}
$this->SaveNewPage();
}