adding a group

Paul Cooper pgc@ucecom.com
Thu, 6 Dec 2001 19:27:50 -0500


---------------------- multipart/mixed attachment
can we add DEFAULT NOW() to category_updated in scripts/db/category.sql - 
otherwise the sql in the addCategory method doesn't work (because category 
updated is null).

Plus to be able to add a group I had to make a couple fo changes to 
Group.php and Category.php - diffs attached.

Paul


-- 
-----------------------------------------------------------------
Paul Cooper                             |  Tel: 0121 331 7858
Senior Programmer and Database Engineer |  Fax: 0121 331 7859
UCEcom                                  |  mailto:pgc@ucecom.com
University of Central England           |  http://www.ucecom.com
Birmingham, B4 7DX                      |
-----------------------------------------------------------------

---------------------- multipart/mixed attachment
Index: Category.php
===================================================================
RCS file: /repository/horde/lib/Category.php,v
retrieving revision 1.10
diff -u -r1.10 Category.php
--- Category.php	15 Nov 2001 16:58:13 -0000	1.10
+++ Category.php	6 Dec 2001 19:12:16 -0000
@@ -283,8 +283,8 @@
 
         $this->categories[$name][$parent] = true;
         
-        if (is_subclass_of($category, 'CategoryObject')) {
-            $this->data[$name] = SerializeUnit::serializeUnit($category->getData(), CATEGORY_SERIALIZE_FORMAT);
+        if (is_subclass_of($this, 'CategoryObject')) {
+            $this->data[$name] = SerializeUnit::serializeUnit($this->getData(), CATEGORY_SERIALIZE_FORMAT);
         }
         
         return true;

---------------------- multipart/mixed attachment
Index: Group.php
===================================================================
RCS file: /repository/horde/lib/Group.php,v
retrieving revision 1.7
diff -u -r1.7 Group.php
--- Group.php	15 Nov 2001 16:58:14 -0000	1.7
+++ Group.php	6 Dec 2001 19:12:48 -0000
@@ -72,7 +72,7 @@
      */
     function addGroup($name, $parent = '-1')
     {
-		return $this->groups->add($name, $parent);
+		return $this->groups->addCategory($name, $parent);
 	}
 
     /**

---------------------- multipart/mixed attachment--