Index: trunk/kernel/include/portalgroup.php =================================================================== diff -u -r278 -r348 --- trunk/kernel/include/portalgroup.php (.../portalgroup.php) (revision 278) +++ trunk/kernel/include/portalgroup.php (.../portalgroup.php) (revision 348) @@ -306,10 +306,9 @@ } else $limit = NULL; - - if(strlen($where)==0) - $where = "1"; - $this->QueryItemCount=TableCount($this->SourceTable,$where,0); + + if(strlen($where) == 0) $where = '1'; + $this->QueryItemCount=TableCount($this->SourceTable, $where, 0); //echo $this->QueryItemCount."
\n"; if ($orderBy!="") @@ -323,7 +322,7 @@ } - function Query_PortalGroup($whereClause=NULL,$orderByClause=NULL) + function Query_PortalGroup($whereClause=NULL,$orderByClause=NULL,$limit=null) { global $m_var_list,$objSession,$Errors; @@ -335,7 +334,8 @@ if(strlen($orderByClause)) if(strlen(trim($orderByClause))) $sql = sprintf('%s ORDER BY %s',$sql,$orderByClause); - + + if( isset($limit) ) $sql .= ' '.$limit; return $this->Query_Item($sql); }