phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: /sitemgr/inc class.Admin_ManageCategories_UI.inc


From: Patrick Walsh <address@hidden>
Subject: [Phpgroupware-cvs] CVS: /sitemgr/inc class.Admin_ManageCategories_UI.inc.php,1.5,1.5.2.1 class.Categories_BO.inc.php,1.4,1.4.2.1 class.Categories_SO.inc.php,1.10,1.10.2.1 class.Common_UI.inc.php,1.6,1.6.2.1 class.admin_ManageSiteContent_UI.inc.php,1.1.1.1,1.1.1.1.2.1 class.contributor_ManagePage_UI.inc.php,1.7,1.7.2.1
Date: Wed, 16 Oct 2002 16:14:33 -0400

Update of /cvsroot/phpgroupware//sitemgr/inc
In directory subversions:/tmp/cvs-serv12557

Modified Files:
      Tag: Version-0_9_14-branch
        class.Admin_ManageCategories_UI.inc.php 
        class.Categories_BO.inc.php class.Categories_SO.inc.php 
        class.Common_UI.inc.php 
        class.admin_ManageSiteContent_UI.inc.php 
        class.contributor_ManagePage_UI.inc.php 
Log Message:
Fixed the problems with categories due to changes in the phpgw categories class


Index: class.Admin_ManageCategories_UI.inc.php
===================================================================
RCS file: 
/cvsroot/phpgroupware//sitemgr/inc/class.Admin_ManageCategories_UI.inc.php,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -r1.5 -r1.5.2.1
*** class.Admin_ManageCategories_UI.inc.php     13 Sep 2002 21:07:34 -0000      
1.5
--- class.Admin_ManageCategories_UI.inc.php     16 Oct 2002 20:14:06 -0000      
1.5.2.1
***************
*** 31,38 ****
                }
  
                function _manageCategories()
                {
                        global 
$btnSaveCategory,$btnAddCategory,$btnEditCategory,$btnDelete,$btnPermission;
!                       global 
$category_id,$catname,$catdesc,$catid,$sort_order,$parent;
                        global $groupaccessread, $groupaccesswrite, 
$individualaccessread, $individualaccesswrite;
  
--- 31,54 ----
                }
  
+               function globalize($varname)
+               {
+                       if (is_array($varname))
+                       {
+                               foreach($varname as $var)
+                               {
+                                       $GLOBALS[$var] = $_POST[$var];
+                               }
+                       }
+                       else
+                       {
+                               $GLOBALS[$varname] = $_POST[$varname];
+                       }
+               }
+ 
                function _manageCategories()
                {
+                       
$this->globalize(array('btnSaveCategory','btnAddCategory','btnEditCategory','btnDelete','btnPermission','category_id','catname','catdesc','catid','sort_order','parent','parent_old','groupaccessread','groupaccesswrite','individualaccessread','individualaccesswrite'));
                        global 
$btnSaveCategory,$btnAddCategory,$btnEditCategory,$btnDelete,$btnPermission;
!                       global 
$category_id,$catname,$catdesc,$catid,$sort_order,$parent,$parent_old;
                        global $groupaccessread, $groupaccesswrite, 
$individualaccessread, $individualaccesswrite;
  
***************
*** 73,77 ****
                                                $groupaccess = 
array_merge_recursive($groupaccessread, $groupaccesswrite);
                                                $individualaccess = 
array_merge_recursive($individualaccessread, $individualaccesswrite);
!                                               
$this->cat_bo->saveCategoryInfo($catid, $catname, $catdesc, $sort_order, 
$parent);
                                                
$this->cat_bo->saveCategoryPerms($catid, $groupaccess, $individualaccess);
                                        }
--- 89,93 ----
                                                $groupaccess = 
array_merge_recursive($groupaccessread, $groupaccesswrite);
                                                $individualaccess = 
array_merge_recursive($individualaccessread, $individualaccesswrite);
!                                               
$this->cat_bo->saveCategoryInfo($catid, $catname, $catdesc, $sort_order, 
$parent, $parent_old);
                                                
$this->cat_bo->saveCategoryPerms($catid, $groupaccess, $individualaccess);
                                        }
***************
*** 188,195 ****
                                'sort_order' => $this->cat->sort_order,
                                'parent_dropdown' => 
$this->getParentOptions($this->cat->parent,$cat_id),
                                'actionurl' => 
$GLOBALS['phpgw']->link('/index.php',
                                        
'menuaction=sitemgr.Admin_ManageCategories_UI._manageCategories')
                        ));
-                       
                        $this->t->set_file('EditCategory', 'edit_category.tpl');
                        $this->t->set_block('EditCategory','GroupBlock', 
'GBlock');
--- 204,211 ----
                                'sort_order' => $this->cat->sort_order,
                                'parent_dropdown' => 
$this->getParentOptions($this->cat->parent,$cat_id),
+                               'old_parent' => $this->cat->parent,
                                'actionurl' => 
$GLOBALS['phpgw']->link('/index.php',
                                        
'menuaction=sitemgr.Admin_ManageCategories_UI._manageCategories')
                        ));
                        $this->t->set_file('EditCategory', 'edit_category.tpl');
                        $this->t->set_block('EditCategory','GroupBlock', 
'GBlock');
***************
*** 325,328 ****
--- 341,345 ----
                function _deleteCategory($cat_id)
                {
+                       $this->globalize('deleteconfirmed');
                        global $deleteconfirmed;
                        if ($deleteconfirmed==$cat_id)

Index: class.Categories_BO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware//sitemgr/inc/class.Categories_BO.inc.php,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -r1.4 -r1.4.2.1
*** class.Categories_BO.inc.php 7 Sep 2002 05:57:28 -0000       1.4
--- class.Categories_BO.inc.php 16 Oct 2002 20:14:06 -0000      1.4.2.1
***************
*** 172,176 ****
                }
  
!               function saveCategoryInfo($cat_id, $cat_name, $cat_description, 
$sort_order=0, $parent=0)
                {
                        $cat_info = CreateObject('sitemgr.Category_SO', True);
--- 172,176 ----
                }
  
!               function saveCategoryInfo($cat_id, $cat_name, $cat_description, 
$sort_order=0, $parent=0, $old_parent=0)
                {
                        $cat_info = CreateObject('sitemgr.Category_SO', True);
***************
*** 180,183 ****
--- 180,191 ----
                        $cat_info->sort_order = $sort_order;
                        $cat_info->parent = $parent;
+                       if ($old_parent!='')
+                       {
+                               $cat_info->old_parent = $old_parent;
+                       }
+                       else
+                       {
+                               $cat_info->old_parent = $parent;
+                       }
  
                        if ($this->acl->can_write_category($cat_id))

Index: class.Categories_SO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware//sitemgr/inc/class.Categories_SO.inc.php,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -C2 -r1.10 -r1.10.2.1
*** class.Categories_SO.inc.php 15 Sep 2002 22:02:23 -0000      1.10
--- class.Categories_SO.inc.php 16 Oct 2002 20:14:06 -0000      1.10.2.1
***************
*** 70,74 ****
                                'descr'         => $description,
                                'access'        => 'public',
!                               'parent'        => $parent
                        );
  
--- 70,75 ----
                                'descr'         => $description,
                                'access'        => 'public',
!                               'parent'        => $parent,
!                               'old_parent' => $parent
                        );
  
***************
*** 91,95 ****
                                'access'        => 'public',
                                'id'            => $cat_info->id,
!                               'parent'        => $cat_info->parent
                        );
  
--- 92,97 ----
                                'access'        => 'public',
                                'id'            => $cat_info->id,
!                               'parent'        => $cat_info->parent,
!                               'old_parent' => $cat_info->old_parent
                        );
  

Index: class.Common_UI.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware//sitemgr/inc/class.Common_UI.inc.php,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** class.Common_UI.inc.php     5 Sep 2002 09:06:03 -0000       1.6
--- class.Common_UI.inc.php     16 Oct 2002 20:14:06 -0000      1.6.2.1
***************
*** 78,87 ****
                                        'default'=>'NukeNews'
                                );
!                               if ($GLOBALS['btnSave'])
                                {
                                        reset($preferences);
                                        while (list($name,$details) = 
each($preferences))
                                        {
!                                               
$this->prefs_so->setPreference($name,$GLOBALS[$name]);
                                        }
                                        echo '<p><b>Changes Saved.</b></p>';
--- 78,87 ----
                                        'default'=>'NukeNews'
                                );
!                               if ($_POST['btnSave'])
                                {
                                        reset($preferences);
                                        while (list($name,$details) = 
each($preferences))
                                        {
!                                               
$this->prefs_so->setPreference($name,$_POST[$name]);
                                        }
                                        echo '<p><b>Changes Saved.</b></p>';

Index: class.admin_ManageSiteContent_UI.inc.php
===================================================================
RCS file: 
/cvsroot/phpgroupware//sitemgr/inc/class.admin_ManageSiteContent_UI.inc.php,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -C2 -r1.1.1.1 -r1.1.1.1.2.1
*** class.admin_ManageSiteContent_UI.inc.php    29 Aug 2002 03:03:17 -0000      
1.1.1.1
--- class.admin_ManageSiteContent_UI.inc.php    16 Oct 2002 20:14:06 -0000      
1.1.1.1.2.1
***************
*** 11,16 ****
--- 11,32 ----
                );
  
+               function globalize($varname)
+               {
+                       if (is_array($varname))
+                       {
+                               foreach($varname as $var)
+                               {
+                                       $GLOBALS[$var] = $_POST[$var];
+                               }
+                       }
+                       else
+                       {
+                               $GLOBALS[$varname] = $_POST[$varname];
+                       }
+               }
+ 
                function admin_ManageSiteContent_UI()
                {       
+                       
$this->globalize(array('btnSave','btnReset','btnHome','header','footer'));
                        global $btnSave;
                        global $btnReset;
***************
*** 26,29 ****
--- 42,46 ----
                function _editHeaderAndFooter()
                {
+                       $this->globalize(array('btnSave','header','footer'));
                        global $btnSave;
                        global $header;

Index: class.contributor_ManagePage_UI.inc.php
===================================================================
RCS file: 
/cvsroot/phpgroupware//sitemgr/inc/class.contributor_ManagePage_UI.inc.php,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -r1.7 -r1.7.2.1
*** class.contributor_ManagePage_UI.inc.php     11 Sep 2002 22:39:28 -0000      
1.7
--- class.contributor_ManagePage_UI.inc.php     16 Oct 2002 20:14:06 -0000      
1.7.2.1
***************
*** 44,49 ****
--- 44,65 ----
                }
                
+               function globalize($varname)
+               {
+                       if (is_array($varname))
+                       {
+                               foreach($varname as $var)
+                               {
+                                       $GLOBALS[$var] = $_POST[$var];
+                               }
+                       }
+                       else
+                       {
+                               $GLOBALS[$varname] = $_POST[$varname];
+                       }
+               }
+ 
                function _editPage($category_id, 
$page_id,$cname='',$ctitle='',$csubtitle='',$cmain='')
                {
+                       
$this->globalize(array('title','name','subtitle','main','sort_order','parent','hidden','btnEditPage'));
                        global $title;
                        global $name;
***************
*** 124,131 ****
                function _managePage()
                {
                        global $hidden;
                        global $btnAddPage, $btnDelete, $btnEditPage;
                        global $btnPrev;
-                       global $pageid;
                        global $btnSave;
                        global $pageid;
--- 140,147 ----
                function _managePage()
                {
+                       
$this->globalize(array('hidden','btnAddPage','btnDelete','btnEditPage','btnPrev','pageid','btnSave','category_id','sort_order','parent','title','name','subtitle','main','error'));
                        global $hidden;
                        global $btnAddPage, $btnDelete, $btnEditPage;
                        global $btnPrev;
                        global $btnSave;
                        global $pageid;





reply via email to

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