phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.categories.inc.php,1.74.2.9,1


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.categories.inc.php,1.74.2.9,1.74.2.10
Date: Tue, 02 Jul 2002 20:56:16 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv32552

Modified Files:
      Tag: Version-0_9_14-branch
        class.categories.inc.php 
Log Message:
update global_cats selection

Index: class.categories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.categories.inc.php,v
retrieving revision 1.74.2.9
retrieving revision 1.74.2.10
diff -C2 -r1.74.2.9 -r1.74.2.10
*** class.categories.inc.php    1 Jul 2002 15:29:01 -0000       1.74.2.9
--- class.categories.inc.php    3 Jul 2002 00:56:13 -0000       1.74.2.10
***************
*** 58,62 ****
                        $this->db         = $GLOBALS['phpgw']->db;
                        $this->grants     = 
$GLOBALS['phpgw']->acl->get_grants($app_name);
!                       $this->cats       = 
$this->return_array($type,$start,$limit,$query,$sort,$order,$public);
                }
  
--- 58,62 ----
                        $this->db         = $GLOBALS['phpgw']->db;
                        $this->grants     = 
$GLOBALS['phpgw']->acl->get_grants($app_name);
!                       $this->cats       = 
$this->return_array($type,$start,$limit,$query,$sort,$order,$globals);
                }
  
***************
*** 113,123 ****
                @param $sort string sort order, either defaults to 'ASC'
                @param $order order by
                @result $cats array
                */
!               function return_array($type,$start,$limit = True,$query = 
'',$sort = '',$order = '',$public = False, $parent_id = '')
                {
!                       if ($public)
                        {
!                               $public_cats = " OR cat_appname='phpgw'";
                        }
  
--- 113,124 ----
                @param $sort string sort order, either defaults to 'ASC'
                @param $order order by
+               @param $globals True or False, includes the global phpgroupware 
categories or not
                @result $cats array
                */
!               function return_array($type,$start,$limit = True,$query = 
'',$sort = '',$order = '',$globals = False, $parent_id = '')
                {
!                       if ($globals)
                        {
!                               $global_cats = " OR cat_appname='phpgw'";
                        }
  
***************
*** 170,174 ****
                        }
  
!                       $sql = "SELECT * from phpgw_categories WHERE 
(cat_appname='" . $this->app_name . "' AND" . $grant_cats . $public_cats . ")"
                                . $parent_filter . $querymethod . $filter;
  
--- 171,175 ----
                        }
  
!                       $sql = "SELECT * from phpgw_categories WHERE 
(cat_appname='" . $this->app_name . "' AND" . $grant_cats . $global_cats . ")"
                                . $parent_filter . $querymethod . $filter;
  
***************
*** 203,211 ****
  
  
!               function return_sorted_array($start,$limit = True,$query = 
'',$sort = '',$order = '',$public = False)
                {
!                       if ($public)
                        {
!                               $public_cats = " OR cat_appname='phpgw'";
                        }
  
--- 204,212 ----
  
  
!               function return_sorted_array($start,$limit = True,$query = 
'',$sort = '',$order = '',$globals = False)
                {
!                       if ($globals)
                        {
!                               $global_cats = " OR cat_appname='phpgw'";
                        }
  
***************
*** 251,255 ****
                        }
  
!                       $sql = "SELECT * from phpgw_categories WHERE 
(cat_appname='" . $this->app_name . "' AND" . $grant_cats . $public_cats . ")"
                                        . $querymethod;
  
--- 252,256 ----
                        }
  
!                       $sql = "SELECT * from phpgw_categories WHERE 
(cat_appname='" . $this->app_name . "' AND" . $grant_cats . $global_cats . ")"
                                        . $querymethod;
  
***************
*** 366,379 ****
                @function formated_list
                @abstract return into a select box, list or other formats
!               @param $format currently only supports select (select box)
                @param $type string - subs or mains
                @param $selected - cat_id or array with cat_id values 
                @result $s array - populated with categories
                */
!               function formatted_list($format,$type='',$selected = '',$public 
= False,$site_link = 'site')
                {
!                       return 
$this->formated_list($format,$type,$selected,$public,$site_link);
                }
!               function formated_list($format,$type='',$selected = '',$public 
= False,$site_link = 'site')
                {
                        if(is_array($format))
--- 367,381 ----
                @function formated_list
                @abstract return into a select box, list or other formats
!               @param $format currently supports select (select box) or list
                @param $type string - subs or mains
                @param $selected - cat_id or array with cat_id values 
+               @param $globals True or False, includes the global phpgroupware 
categories or not
                @result $s array - populated with categories
                */
!               function formatted_list($format,$type='',$selected = 
'',$globals = False,$site_link = 'site')
                {
!                       return 
$this->formated_list($format,$type,$selected,$globals,$site_link);
                }
!               function formated_list($format,$type='',$selected = '',$globals 
= False,$site_link = 'site')
                {
                        if(is_array($format))
***************
*** 382,386 ****
                                $type = $format['type'];
                                $selected = 
(isset($format['selected'])?$format['selected']:'');
!                               $public = 
(isset($format['public'])?$format['public']:False);
                                $site_link = 
(isset($format['site_link'])?$format['site_link']:'site');
                                settype($format,'string');
--- 384,388 ----
                                $type = $format['type'];
                                $selected = 
(isset($format['selected'])?$format['selected']:'');
!                               $globals = 
(isset($format['globals'])?$format['globals']:False);
                                $site_link = 
(isset($format['site_link'])?$format['site_link']:'site');
                                settype($format,'string');
***************
*** 396,404 ****
                        if ($type != 'all')
                        {
!                               $cats = 
$this->return_array($type,$start,False,$query,$sort,$order,$public);
                        }
                        else
                        {
!                               $cats = 
$this->return_sorted_array($start,False,$query,$sort,$order,$public);
                        }
  
--- 398,406 ----
                        if ($type != 'all')
                        {
!                               $cats = 
$this->return_array($type,$start,False,$query,$sort,$order,$globals);
                        }
                        else
                        {
!                               $cats = 
$this->return_sorted_array($start,False,$query,$sort,$order,$globals);
                        }
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]