R35341 - /trunk/phpgwapi/inc/class.categories.inc.php

Author: nathangray
New Revision: 35341

URL: http://svn.stylite.de/viewvc/egroupware?rev=35341&view=rev
Log:
Allow categories->return_sorted_array() to use a filter too

Modified:
trunk/phpgwapi/inc/class.categories.inc.php

Modified: trunk/phpgwapi/inc/class.categories.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/phpgwapi/inc/class.categories.inc.php?rev=35341&r1=35340&r2=35341&view=diff

— trunk/phpgwapi/inc/class.categories.inc.php (original)
+++ trunk/phpgwapi/inc/class.categories.inc.php Thu Jun 16 00:32:52 2011
@@ -321,7 +321,7 @@
* @param boolean $unserialize_data=false return $cat[‘data’] as array (not serialized array)
* @return array with cats
*/

  • function return_sorted_array($start=0,$limit=True,$query=’’,$sort=‘ASC’,$order=‘cat_name’,$globals=False, $parent_id=0,$unserialize_data=false)
  • function return_sorted_array($start=0,$limit=True,$query=’’,$sort=‘ASC’,$order=‘cat_name’,$globals=False, $parent_id=0,$unserialize_data=false,$filter=null)
    {
    if (!$sort) $sort = ‘ASC’;
    if (!$order) $order = ‘cat_name’;
    @@ -329,7 +329,7 @@
    //error_log(METHOD."($start,$limit,$query,$sort,$order,globals=$globals,parent=$parent_id,$unserialize_data) account_id=$this->account_id, appname=$this->app_name: ".function_backtrace());

    $parents = $cats = array();
    
  •   if (!($cats = $this->return_array('all',0,false,$query,$sort,$order,$globals,(array)$parent_id,-1,'',null,$unserialize_data)))
    
  •   if (!($cats = $this->return_array('all',0,false,$query,$sort,$order,$globals,(array)$parent_id,-1,'',$filter,$unserialize_data)))
      {
      	$cats = array();
      }
    

@@ -339,7 +339,7 @@
}
while (count($parents))
{

  •   	if (!($subs = $this->return_array('all',0,false,$query,$sort,$order,$globals,$parents,-1,'',null,$unserialize_data)))
    
  •   	if (!($subs = $this->return_array('all',0,false,$query,$sort,$order,$globals,$parents,-1,'',$filter,$unserialize_data)))
      	{
      		break;
      	}
    

EditLive Enterprise is the world’s most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev


eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs