Index: trunk/kernel/include/parseditem.php
===================================================================
diff -u -r561 -r568
--- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 561)
+++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 568)
@@ -643,6 +643,10 @@
var $BasePermission;
var $Dummy = null;
+ // enshure that same sql won't be queried twice
+ var $QueryDone = false;
+ var $LastQuerySQL = '';
+
function SetTable($action, $table_name = null) // new by Alex
{
// $action = {'live', 'restore','edit'}
@@ -1025,7 +1029,7 @@
{
$count++;
$data = $result->fields;
- $this->AddItemFromArray($data,TRUE);
+ $this->AddItemFromArray($data,TRUE);
if( defined('ADODB_EXTENSION') && constant('ADODB_EXTENSION') > 0 )
adodb_movenext($result);
else
@@ -1449,6 +1453,8 @@
var $PageEnvarIndex;
var $ListType;
+ var $LastLimitClause = ''; // used to store last limit cluse used in query
+
function clsItemList()
{
$this->clsItemCollection();
@@ -1617,9 +1623,9 @@
}
- function GetPageLinkList($dest_template=NULL,$page = "",$PagesToList=10, $HideEmpty=TRUE)
+ function GetPageLinkList($dest_template=NULL,$page = "",$PagesToList=10, $HideEmpty=TRUE,$EnvSuffix = '')
{
- global $objConfig, $var_list_update, $var_list;
+ global $objConfig, $var_list_update, $var_list;
$v= $this->PageEnvar;
@@ -1667,7 +1673,7 @@
{
${$v}[$this->PageEnvarIndex] = $this->Page-$PagesToList;
- $prev_url = $page."?env=".BuildEnv();
+ $prev_url = $page."?env=".BuildEnv().$EnvSuffix;
$o .= "<<";
}
@@ -1676,7 +1682,7 @@
if($p!=$this->Page)
{
${$v}[$this->PageEnvarIndex]=$p;
- $href = $page."?env=".BuildEnv();
+ $href = $page."?env=".BuildEnv().$EnvSuffix;
$o .= " $p ";
}
else
@@ -1688,7 +1694,7 @@
{
${$v}[$this->PageEnvarIndex]=$this->Page+$PagesToList;
- $next_url = $page."?env=".BuildEnv();
+ $next_url = $page."?env=".BuildEnv().$EnvSuffix;
$o .= " >>";
}
unset(${$v}[$this->PageEnvarIndex],$var_list_update["t"] );