Index: trunk/kernel/include/parseditem.php =================================================================== diff -u -r568 -r640 --- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 568) +++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 640) @@ -993,6 +993,7 @@ if($rows>-1 && $offset>-1) { + //print_pre(debug_backtrace()); //echo "Executing SelectLimit $sql Offset: $offset,$rows
\n"; $result = $this->adodbConnection->SelectLimit($sql, $rows,$offset); } @@ -1012,16 +1013,17 @@ } $this->Clear(); - + if($this->debuglevel > 0) { - echo "This SQL: $sql
"; + echo "This SQL: $sql

"; if( ($this->debuglevel > 1) && ($result->RecordCount() > 0) ) { echo '
'.print_r($result->GetRows(), true).'
'; $result->MoveFirst(); } } + //echo "SQL: $sql

"; LogEntry("SQL Loop Start\n"); $count = 0; @@ -1463,7 +1465,7 @@ } function GetPageLimitSQL() - { + { global $objConfig; $limit = NULL; if($this->EnablePaging) @@ -1493,13 +1495,13 @@ { $Start = 0; if($this->EnablePaging) - { + { if($this->Page < 1) $this->Page = 1; $PerPage = $this->GetPerPage(); $Start = ($this->Page - 1) * $PerPage; } else - { + { if((int)$this->MaxListCount == 0) $Start = -1; } return $Start; @@ -1527,7 +1529,7 @@ return parent::Query_Item($sql); } else - { + { //echo "page fix pre (class: ".get_class($this).")
"; $this->QueryItemCount = QueryCount($sql); // must get total item count before fixing $this->FixInvalidPage($fix_method);