phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: admin/inc class.uicategories.inc.php,1.21,1.22


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: admin/inc class.uicategories.inc.php,1.21,1.22
Date: Fri, 04 Oct 2002 16:58:27 -0400

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

Modified Files:
        class.uicategories.inc.php 
Log Message:
fix for bug 1286

Index: class.uicategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uicategories.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** class.uicategories.inc.php  25 Sep 2002 01:10:26 -0000      1.21
--- class.uicategories.inc.php  4 Oct 2002 20:58:25 -0000       1.22
***************
*** 35,46 ****
                function uicategories()
                {
!                       $this->bo         = CreateObject('admin.bocategories');
!                       $this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
  
!                       $this->start  = $this->bo->start;
!                       $this->query  = $this->bo->query;
!                       $this->sort   = $this->bo->sort;
!                       $this->order  = $this->bo->order;
!                       $this->cat_id = $this->bo->cat_id;
                        if($this->debug) { $this->_debug_sqsof(); }
                }
--- 35,46 ----
                function uicategories()
                {
!                       $this->bo                       = 
CreateObject('admin.bocategories');
!                       $this->nextmatchs       = 
CreateObject('phpgwapi.nextmatchs');
  
!                       $this->start            = $this->bo->start;
!                       $this->query            = $this->bo->query;
!                       $this->sort                     = $this->bo->sort;
!                       $this->order            = $this->bo->order;
!                       $this->cat_id           = $this->bo->cat_id;
                        if($this->debug) { $this->_debug_sqsof(); }
                }
***************
*** 49,57 ****
                {
                        $data = array(
!                               'start'  => $this->start,
!                               'query'  => $this->query,
!                               'sort'   => $this->sort,
!                               'order'  => $this->order,
!                               'cat_id' => $this->cat_id
                        );
                        echo '<br>UI:<br>';
--- 49,57 ----
                {
                        $data = array(
!                               'start'         => $this->start,
!                               'query'         => $this->query,
!                               'sort'          => $this->sort,
!                               'order'         => $this->order,
!                               'cat_id'        => $this->cat_id
                        );
                        echo '<br>UI:<br>';
***************
*** 63,70 ****
                        $data = array
                        (
!                               'start' => $this->start,
!                               'query' => $this->query,
!                               'sort'  => $this->sort,
!                               'order' => $this->order
                        );
  
--- 63,70 ----
                        $data = array
                        (
!                               'start' => $this->start,
!                               'query' => $this->query,
!                               'sort'  => $this->sort,
!                               'order' => $this->order
                        );
  
***************
*** 336,344 ****
                        $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'];
  
                        $GLOBALS['phpgw']->template->set_file(array('cat_form' 
=> 'category_form.tpl'));
--- 336,345 ----
                        $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'];
!                       $old_parent                     = 
$GLOBALS['HTTP_POST_VARS']['old_parent'];
  
                        $GLOBALS['phpgw']->template->set_file(array('cat_form' 
=> 'category_form.tpl'));
***************
*** 347,353 ****
                        
$GLOBALS['phpgw']->template->set_block('cat_form','form');
  
- 
-                       $hidden_vars = '<input type="hidden" name="cat_id" 
value="' . $this->cat_id . '">' . "\n";
-                       
$GLOBALS['phpgw']->template->set_var('hidden_vars',$hidden_vars);
                        
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
--- 348,351 ----
***************
*** 361,369 ****
                                $values = array
                                (
!                                       'id'     => $this->cat_id,
!                                       'parent' => $cat_parent,
!                                       'descr'  => $cat_description,
!                                       'name'   => $cat_name,
!                                       'access' => 'public'
                                );
  
--- 359,368 ----
                                $values = array
                                (
!                                       'id'                    => 
$this->cat_id,
!                                       'old_parent'    => $old_parent,
!                                       'parent'                => $cat_parent,
!                                       'descr'                 => 
$cat_description,
!                                       'name'                  => $cat_name,
!                                       'access'                => 'public'
                                );
  
***************
*** 375,379 ****
                                else
                                {
!                                       $this->bo->save_cat($values);
                                        
$GLOBALS['phpgw']->template->set_var('message',lang('Category x has been 
updated !',$cat_name));
                                }
--- 374,378 ----
                                else
                                {
!                                       $this->cat_id = 
$this->bo->save_cat($values);
                                        
$GLOBALS['phpgw']->template->set_var('message',lang('Category x has been 
updated !',$cat_name));
                                }
***************
*** 391,394 ****
--- 390,397 ----
                        }
  
+                       $hidden_vars = '<input type="hidden" name="cat_id" 
value="' . $this->cat_id . '">' . "\n"
+                                                       . '<input type="hidden" 
name="old_parent" value="' . $cats[0]['parent'] . '">' . "\n";
+                       
$GLOBALS['phpgw']->template->set_var('hidden_vars',$hidden_vars);
+ 
                        $link_data['menuaction'] = 'admin.uicategories.edit';
                        $link_data['cat_id']     = $this->cat_id;
***************
*** 399,409 ****
                        
$GLOBALS['phpgw']->template->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats[0]['name']));
                        
$GLOBALS['phpgw']->template->set_var('cat_description',$GLOBALS['phpgw']->strip_html($cats[0]['description']));
!                       
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->formatted_list(array(
!                               'select'      => 'select',
!                               'all'         => 'all',
!                               'cat_parent'  => $cats[0]['parent'],
!                               'global_cats' => $global_cats
!                       )));
! 
                        $GLOBALS['phpgw']->template->parse('buttons','edit');
                        $GLOBALS['phpgw']->template->fp('phpgw_body','form');
--- 402,409 ----
                        
$GLOBALS['phpgw']->template->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats[0]['name']));
                        
$GLOBALS['phpgw']->template->set_var('cat_description',$GLOBALS['phpgw']->strip_html($cats[0]['description']));
!                       
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->formatted_list(array('select'
   => 'select',
!                                                                               
                                                                                
                                        'all'   => 'all',
!                                                                               
                                                                                
                        'cat_parent'    => $cats[0]['parent'],
!                                                                               
                                                                                
                        'global_cats'   => $global_cats)));
                        $GLOBALS['phpgw']->template->parse('buttons','edit');
                        $GLOBALS['phpgw']->template->fp('phpgw_body','form');





reply via email to

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