phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: admin/inc class.bocategories.inc.php,1.5,1.6 cla


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: admin/inc class.bocategories.inc.php,1.5,1.6 class.uicategories.inc.php,1.8,1.9
Date: Wed, 13 Mar 2002 11:30:35 -0500

Update of /cvsroot/phpgroupware/admin/inc
In directory subversions:/tmp/cvs-serv13335/inc

Modified Files:
        class.bocategories.inc.php class.uicategories.inc.php 
Log Message:
update cats

Index: class.bocategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.bocategories.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.bocategories.inc.php  13 Mar 2002 04:15:31 -0000      1.5
--- class.bocategories.inc.php  13 Mar 2002 16:30:32 -0000      1.6
***************
*** 125,129 ****
                function formatted_list($data)
                {
!                       return 
$this->cats->formated_list($data['select'],$data['all'],$data['cat_parent']);
                }
  
--- 125,129 ----
                function formatted_list($data)
                {
!                       return 
$this->cats->formated_list($data['select'],$data['all'],$data['cat_parent'],True);
                }
  

Index: class.uicategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uicategories.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.uicategories.inc.php  13 Mar 2002 04:15:31 -0000      1.8
--- class.uicategories.inc.php  13 Mar 2002 16:30:32 -0000      1.9
***************
*** 60,64 ****
                }
  
-               /* Called only by index() */
                function save_sessiondata()
                {
--- 60,63 ----
***************
*** 167,171 ****
                                }
  
!                               if ($categories[$i]['app_name'] == 'phpgw')
                                {
                                        $appendix = '&lt;' . lang('Global') . 
'&gt;';
--- 166,170 ----
                                }
  
!                               if ($GLOBALS['appname'] && 
$categories[$i]['app_name'] == 'phpgw')
                                {
                                        $appendix = '&lt;' . lang('Global') . 
'&gt;';
***************
*** 183,188 ****
  
                                $link_data['menuaction'] = 
'admin.uicategories.add';
-                               
$this->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
- 
                                $link_data['cat_parent'] = $id;
                                
$this->template->set_var('add_sub',$GLOBALS['phpgw']->link('/index.php',$link_data));
--- 182,185 ----
***************
*** 201,204 ****
--- 198,205 ----
                        }
  
+                       $link_data['menuaction'] = 'admin.uicategories.add';
+                       $link_data['cat_parent'] = '';
+                       
$this->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
+ 
                        $this->save_sessiondata();
                        $this->template->pfp('out','cat_list_t',True);
***************
*** 207,210 ****
--- 208,217 ----
                function add()
                {
+                       $link_data = array
+                       (
+                               'menuaction'    => 'admin.uicategories.index',
+                               'appname'               => $GLOBALS['appname']
+                       ));
+ 
                        $GLOBALS['phpgw']->common->phpgw_header();
                        echo parse_navbar();
***************
*** 212,220 ****
                        $this->set_langs();
  
!                       $new_parent = $GLOBALS['HTTP_POST_VARS']['new_parent'];
!                       $submit     = $GLOBALS['HTTP_POST_VARS']['submit'];
!                       $cat_parent = $GLOBALS['HTTP_POST_VARS']['cat_parent'] 
? $GLOBALS['HTTP_POST_VARS']['cat_parent'] : 
$GLOBALS['HTTP_GET_VARS']['cat_parent'];
!                       $cat_name   = $GLOBALS['HTTP_POST_VARS']['cat_name'];
!                       $cat_description = 
$GLOBALS['HTTP_POST_VARS']['cat_description'];
  
                        $this->template->set_file(array('form' => 
'category_form.tpl'));
--- 219,227 ----
                        $this->set_langs();
  
!                       $new_parent                     = 
$GLOBALS['HTTP_POST_VARS']['new_parent'];
!                       $submit                         = 
$GLOBALS['HTTP_POST_VARS']['submit'];
!                       $cat_parent                     = 
$GLOBALS['HTTP_POST_VARS']['cat_parent'] ? 
$GLOBALS['HTTP_POST_VARS']['cat_parent'] : 
$GLOBALS['HTTP_GET_VARS']['cat_parent'];
!                       $cat_name                       = 
$GLOBALS['HTTP_POST_VARS']['cat_name'];
!                       $cat_description        = 
$GLOBALS['HTTP_POST_VARS']['cat_description'];
  
                        $this->template->set_file(array('form' => 
'category_form.tpl'));
***************
*** 222,233 ****
                        $this->template->set_block('form','edit','edithandle');
  
                        if ($GLOBALS['appname'])
                        {
-                               $this->bo->cats->app_name = $GLOBALS['appname'];
                                
$this->template->set_var('title_categories',lang('Add global category for 
%1',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']));
                        }
                        else
                        {
-                               $this->bo->cats->app_name = 'phpgw';
                                
$this->template->set_var('title_categories',lang('Add global category'));
                        }
--- 229,240 ----
                        $this->template->set_block('form','edit','edithandle');
  
+                       
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
+ 
                        if ($GLOBALS['appname'])
                        {
                                
$this->template->set_var('title_categories',lang('Add global category for 
%1',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']));
                        }
                        else
                        {
                                
$this->template->set_var('title_categories',lang('Add global category'));
                        }
***************
*** 260,266 ****
                        }
  
!                       
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.add'
 . '&appname=' . $GLOBALS['appname']));
!                       
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index'
 . '&appname=' . $GLOBALS['appname']));
!                       $this->template->set_var('hidden_vars','<input 
type="hidden" name="cat_id" value="' . $this->cat_id . '">');
                        
$this->template->set_var('category_list',$this->bo->formatted_list(array('select'
 => 'select','all' => 'all','cat_parent' => $cat_parent)));
                        $this->template->set_var('cat_name',$cat_name);
--- 267,273 ----
                        }
  
!                       $link_data['menuaction'] = 'admin.uicategories.add';    
                
!                       
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
! 
                        
$this->template->set_var('category_list',$this->bo->formatted_list(array('select'
 => 'select','all' => 'all','cat_parent' => $cat_parent)));
                        $this->template->set_var('cat_name',$cat_name);
***************
*** 275,281 ****
                function edit()
                {
                        if (!$this->cat_id)
                        {
!                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index'));
                        }
  
--- 282,294 ----
                function edit()
                {
+                       $link_data = array
+                       (
+                               'menuaction'    => 'admin.uicategories.index',
+                               'appname'               => $GLOBALS['appname']
+                       ));
+ 
                        if (!$this->cat_id)
                        {
!                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php',$link_data));
                        }
  
***************
*** 285,293 ****
                        $this->set_langs();
  
!                       $new_parent = $GLOBALS['HTTP_POST_VARS']['new_parent'];
!                       $submit     = $GLOBALS['HTTP_POST_VARS']['submit'];
!                       $cat_parent = $GLOBALS['HTTP_POST_VARS']['cat_parent'];
!                       $cat_name   = $GLOBALS['HTTP_POST_VARS']['cat_name'];
!                       $cat_description = 
$GLOBALS['HTTP_POST_VARS']['cat_description'];
  
                        $this->template->set_file(array('form' => 
'category_form.tpl'));
--- 298,306 ----
                        $this->set_langs();
  
!                       $new_parent                     = 
$GLOBALS['HTTP_POST_VARS']['new_parent'];
!                       $submit                         = 
$GLOBALS['HTTP_POST_VARS']['submit'];
!                       $cat_parent                     = 
$GLOBALS['HTTP_POST_VARS']['cat_parent'];
!                       $cat_name                       = 
$GLOBALS['HTTP_POST_VARS']['cat_name'];
!                       $cat_description        = 
$GLOBALS['HTTP_POST_VARS']['cat_description'];
  
                        $this->template->set_file(array('form' => 
'category_form.tpl'));
***************
*** 295,301 ****
                        $this->template->set_block('form','edit','edithandle');
  
-                       $this->bo->cats->app_name = 'phpgw';
- 
                        $hidden_vars = '<input type="hidden" name="cat_id" 
value="' . $this->cat_id . '">' . "\n";
  
                        if ($new_parent)
--- 308,314 ----
                        $this->template->set_block('form','edit','edithandle');
  
                        $hidden_vars = '<input type="hidden" name="cat_id" 
value="' . $this->cat_id . '">' . "\n";
+                       $this->template->set_var('hidden_vars',$hidden_vars);
+                       
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
                        if ($new_parent)
***************
*** 338,345 ****
                        }
  
!                       
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.edit&appname='
 . $GLOBALS['appname']));
!                       
$this->template->set_var('deleteurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.delete&cat_id='
 . $this->cat_id . '&appname=' . $GLOBALS['appname']));
!                       
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
 . $GLOBALS['appname']));
!                       $this->template->set_var('hidden_vars',$hidden_vars);
  
                        
$this->template->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats[0]['name']));
--- 351,359 ----
                        }
  
!                       $link_data['menuaction']        = 
'admin.uicategories.edit'; 
!                       $link_data['cat_id']            = $this->cat_id; 
!                       
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       $link_data['menuaction']        = 
'admin.uicategories.delete'; 
!                       
$this->template->set_var('deleteurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
                        
$this->template->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats[0]['name']));
***************
*** 366,371 ****
                        }
  
-                       $this->bo->cats->app_name = 'phpgw';
- 
                        if ($GLOBALS['HTTP_POST_VARS']['confirm'])
                        {
--- 380,383 ----
***************
*** 382,387 ****
                        else
                        {
-                               $hidden_vars = '<input type="hidden" 
name="cat_id" value="' . $this->cat_id . '">' . "\n";
- 
                                
$this->template->set_file(array('category_delete' => 'delete_cat.tpl'));
                                
$this->template->set_block('category_delete','delete','deletehandle');
--- 394,397 ----
***************
*** 400,408 ****
                                echo parse_navbar();
  
                                if ($apps_cats)
                                {
                                        
$this->template->set_var('messages',lang('This category is currently being used 
by applications as a parent category') . '<br>'
                                                . lang('You will need to remove 
the subcategories before you can delete this category'));
!                                       
$this->template->set_var('hidden_vars',$hidden_vars);
                                        
$this->template->set_var('lang_subs','');
                                        $this->template->set_var('subs','');
--- 410,421 ----
                                echo parse_navbar();
  
+                               $hidden_vars = '<input type="hidden" 
name="cat_id" value="' . $this->cat_id . '">' . "\n";
+                               
$this->template->set_var('hidden_vars',$hidden_vars);
+ 
                                if ($apps_cats)
                                {
                                        
$this->template->set_var('messages',lang('This category is currently being used 
by applications as a parent category') . '<br>'
                                                . lang('You will need to remove 
the subcategories before you can delete this category'));
! 
                                        
$this->template->set_var('lang_subs','');
                                        $this->template->set_var('subs','');
***************
*** 416,426 ****
                                {
                                        
$this->template->set_var('messages',lang('Are you sure you want to delete this 
category ?'));
-                                       
$this->template->set_var('hidden_vars',$hidden_vars);
  
!                                       $exists = $this->bo->exists(array(
                                                'type'     => 'subs',
                                                'cat_name' => '',
                                                'cat_id'   => $this->cat_id
                                        ));
                                        if ($exists)
                                        {
--- 429,440 ----
                                {
                                        
$this->template->set_var('messages',lang('Are you sure you want to delete this 
category ?'));
  
!                                       $exists = $this->bo->exists(array
!                                       (
                                                'type'     => 'subs',
                                                'cat_name' => '',
                                                'cat_id'   => $this->cat_id
                                        ));
+ 
                                        if ($exists)
                                        {




reply via email to

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