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.111,1.11


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.categories.inc.php,1.111,1.112
Date: Tue, 24 Jun 2003 09:32:08 -0400

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

Modified Files:
        class.categories.inc.php 
Log Message:
fix bug #3861

Index: class.categories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.categories.inc.php,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -r1.111 -r1.112
*** class.categories.inc.php    21 Jun 2003 00:59:30 -0000      1.111
--- class.categories.inc.php    24 Jun 2003 13:32:06 -0000      1.112
***************
*** 399,403 ****
                */
  
!               function formatted_list($format,$type = 'all',$selected = 
'',$globals = False,$site_link = 'site')
                {
                        if(is_array($format))
--- 399,403 ----
                */
  
!               function formatted_list($format,$type = 'all',$selected = 
'',$globals = True,$site_link = 'site',$self = '')
                {
                        if(is_array($format))
***************
*** 406,413 ****
                                $type                   = 
(isset($format['type'])?$format['type']:'all');
                                $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');
!                               $format                 = $temp_format;
                                unset($temp_format);
                        }
--- 406,414 ----
                                $type                   = 
(isset($format['type'])?$format['type']:'all');
                                $selected               = 
(isset($format['selected'])?$format['selected']:'');
!                               $self                   = 
(isset($format['self'])?$format['self']:'');
!                               $globals                = 
(isset($format['globals'])?$format['globals']:True);
                                $site_link              = 
(isset($format['site_link'])?$format['site_link']:'site');
                                settype($format,'string');
!                               $format                 = 
($temp_format?$temp_format:'select');
                                unset($temp_format);
                        }
***************
*** 427,430 ****
--- 428,442 ----
                        }
  
+                       if($self)
+                       {
+                               for ($i=0;$i<count($cats);$i++)
+                               {
+                                       if ($cats[$i]['cat_id'] == $self)
+                                       {
+                                               unset($cats[$i]);
+                                       }
+                               }
+                       }
+ 
                        if ($format == 'select')
                        {
***************
*** 500,504 ****
                                $type                   = 
(isset($data['type'])?$data['type']:'all');
                                $selected               = 
(isset($data['selected'])?$data['selected']:'');
!                               $globals                = 
(isset($data['globals'])?$data['globals']:False);
                        }
  
--- 512,517 ----
                                $type                   = 
(isset($data['type'])?$data['type']:'all');
                                $selected               = 
(isset($data['selected'])?$data['selected']:'');
!                               $self                   = 
(isset($data['self'])?$data['self']:'');
!                               $globals                = 
(isset($data['globals'])?$data['globals']:True);
                        }
  
***************
*** 525,528 ****
--- 538,552 ----
                                        
$GLOBALS['phpgw']->xslttpl->add_file($GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'cat_filter');
                                        break;
+                       }
+ 
+                       if($self)
+                       {
+                               for ($i=0;$i<count($cats);$i++)
+                               {
+                                       if ($cats[$i]['cat_id'] == $self)
+                                       {
+                                               unset($cats[$i]);
+                                       }
+                               }
                        }
  





reply via email to

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