tags 322717 +patch
tags 323257 +patch
tags 323258 +patch
tags 323259 +patch
tags 323264 +patch
tags 323265 +patch
tags 323266 +patch
tags 323267 +patch
tags 323268 +patch
tags 323269 +patch
thanks

It seems I had forgotten to attach the patch in my previous message.
Here it is.

Setting tag "patch" because there is a patch / a shell script to generate
one in the bug log.
--- ./lib/Category.php.deb      2005-08-15 20:32:53.899734001 +0200
+++ ./lib/Category.php  2005-08-15 20:34:32.035918038 +0200
@@ -118,7 +118,8 @@
         $driver = strtolower($driver);
 
         if (empty($driver) || (strcmp($driver, 'none') == 0)) {
-            return new Category($params);
+            $result = new Category($params);
+            return $result;
         }
 
         if (!empty($app)) {
@@ -130,7 +131,8 @@
         }
         $class = 'Category_' . $driver;
         if (class_exists($class)) {
-            return new $class($params);
+            $result = new $class($params);
+            return $result;
         } else {
             return PEAR::raiseError('Class definition of ' . $class . ' not 
found.');
         }
@@ -197,9 +199,11 @@
         }
 
         if ($this->exists($category, $parent)) {
-            return new PEAR_Error('Already exists');
+            $result = new PEAR_Error('Already exists');
+            return $result;
         } elseif ($parent != '-1' && !isset($this->_categories[$parent])) {
-            return new PEAR_Error('Add failed');
+            $result = new PEAR_Error('Add failed');
+            return $result;
         } elseif (!isset($this->_categories[$category])) {
             $this->_categories[$category] = array();
         }
@@ -245,14 +249,16 @@
 
         case '-1':
             if (!isset($this->_categories[$category][$parent])) {
-                return new PEAR_Error('Does not exist');
+                $result = new PEAR_Error('Does not exist');
+                return $result;
             }
             unset($this->_categories[$category][$parent]);
             break;
 
         default:
             if (!isset($this->_categories[$category][$parent])) {
-                return new PEAR_Error('Does not exist');
+                $result = new PEAR_Error('Does not exist');
+                return $result;
             }
             unset($this->_categories[$category][$parent]);
         }
@@ -281,10 +287,12 @@
         }
 
         if ($this->exists($category, $old_parent) != true) {
-            return new PEAR_Error('Does not exist');
+            $result = new PEAR_Error('Does not exist');
+            return $result;
         }
         if ($this->exists($new_parent) != true) {
-            return new PEAR_Error('Does not exist');
+            $result = new PEAR_Error('Does not exist');
+            return $result;
         }
 
         unset($this->_categories[$category][$old_parent]);
@@ -316,10 +324,12 @@
         }
 
         if (!$this->exists($old_name)) {
-            return new PEAR_Error('Does not exist');
+            $result = new PEAR_Error('Does not exist');
+            return $result;
         }
         if ($this->exists($new_name)) {
-            return new PEAR_Error('Duplicate name');
+            $result = new PEAR_Error('Duplicate name');
+            return $result;
         }
 
         $this->_categories[$new_name] = $this->_categories[$old_name];
@@ -371,7 +381,8 @@
         }
 
         if (!$this->exists($name)) {
-            return new PEAR_Error('Does not exist');
+            $result = new PEAR_Error('Does not exist');
+            return $result;
         }
 
         return true;
@@ -633,7 +644,8 @@
             $child = $child->getName();
         }
         if ($this->exists($child, $parentfrom) != true) {
-            return new PEAR_Error('Does not exist');
+            $result = new PEAR_Error('Does not exist');
+            return $result;
         }
 
         return $this->_categories[$child];
@@ -651,7 +663,8 @@
     {
         $ret = $this->getImmediateParents($child, $parentfrom);
         if (!is_array($ret)) {
-            return new PEAR_Error('Parents not found');
+            $result = new PEAR_Error('Parents not found');
+            return $result;
         }
 
         foreach ($ret as $parent => $trueval) {
--- ./lib/Cache.php.deb 2005-08-15 20:32:53.906732873 +0200
+++ ./lib/Cache.php     2005-08-15 20:34:32.038917554 +0200
@@ -47,7 +47,8 @@
         /* Return a base Cache object if no driver is specified. */
         $driver = strtolower(basename($driver));
         if (empty($driver) || (strcmp($driver, 'none') == 0)) {
-            return new Cache;
+            $result = new Cache;
+            return $result;
         }
 
         if (!empty($app)) {
@@ -59,7 +60,8 @@
         }
         $class = 'Cache_' . $driver;
         if (class_exists($class)) {
-            return new $class($params);
+            $result = new $class($params);
+            return $result;
         } else {
             return PEAR::raiseError('Class definition of ' . $class . ' not 
found.');
         }
--- ./lib/Token.php.deb 2005-08-15 20:32:53.911732067 +0200
+++ ./lib/Token.php     2005-08-15 20:34:32.041917071 +0200
@@ -66,7 +66,8 @@
         /* Return a base Token object if no driver is specified. */
         $driver = strtolower($driver);
         if (empty($driver) || (strcmp($driver, 'none') == 0)) {
-            return new Token($params);
+            $result = new Token($params);
+            return $result;
         }
 
         if (!empty($app)) {
@@ -78,7 +79,8 @@
         }
         $class = 'Token_' . $driver;
         if (class_exists($class)) {
-            return new $class($params);
+            $result = new $class($params);
+            return $result;
         } else {
             return PEAR::raiseError('Class definition of ' . $class . ' not 
found.');
         }
--- ./lib/Category/sql.php.deb  2005-08-15 20:32:53.947726266 +0200
+++ ./lib/Category/sql.php      2005-08-15 20:34:32.044916588 +0200
@@ -277,7 +277,8 @@
         }
 
         if ($this->exists($name)) {
-            return new PEAR_Error('Removal failed');
+            $result = new PEAR_Error('Removal failed');
+            return $result;
         }
 
         return true;
--- ./lib/VFS/Object.php.deb    2005-08-15 20:32:53.984720304 +0200
+++ ./lib/VFS/Object.php        2005-08-15 20:34:32.048915943 +0200
@@ -74,7 +74,8 @@
     function &factory($driver, $params = array())
     {
         $vfs = Horde_VFS::factory($driver, $params = array());
-        return new Horde_ObjectVFS($vfs);
+        $result = new Horde_ObjectVFS($vfs);
+        return $result;
     }
 
     /**
@@ -102,7 +103,8 @@
     function &singleton($driver, $params = array())
     {
         $vfs = &Horde_VFS::singleton($driver, $params = array());
-        return new Horde_ObjectVFS(&$vfs);
+        $result = new Horde_ObjectVFS(&$vfs);
+        return $result;
     }
 
     /**
--- ./lib/VFS.php.deb   2005-08-15 20:32:53.995718532 +0200
+++ ./lib/VFS.php       2005-08-15 20:34:32.051915460 +0200
@@ -67,7 +67,8 @@
         /* Return a base Horde_VFS object if no driver is specified. */
         $driver = strtolower($driver);
         if (empty($driver) || (strcmp($driver, 'none') == 0)) {
-            return new Horde_VFS($params);
+            $result = new Horde_VFS($params);
+            return $result;
         }
 
         if (@file_exists(dirname(__FILE__) . '/VFS/' . $driver . '.php')) {
@@ -77,7 +78,8 @@
         }
         $class = 'Horde_VFS_' . $driver;
         if (class_exists($class)) {
-            return new $class($params);
+            $result = new $class($params);
+            return $result;
         } else {
             return PEAR::raiseError('Class definition of ' . $class . ' not 
found.');
         }
--- ./lib/SessionHandler.php.deb        2005-08-15 20:32:54.000717726 +0200
+++ ./lib/SessionHandler.php    2005-08-15 20:34:32.054914976 +0200
@@ -56,7 +56,8 @@
 
         $class = 'SessionHandler_' . $driver;
         if (class_exists($class)) {
-            return new $class($params);
+            $result = new $class($params);
+            return $result;
         } else {
             return PEAR::raiseError('Class definition of ' . $class . ' not 
found.');
         }
--- ./lib/Auth.php.deb  2005-08-15 20:32:54.006716759 +0200
+++ ./lib/Auth.php      2005-08-15 20:34:32.057914493 +0200
@@ -65,7 +65,8 @@
         $driver = strtolower(basename($driver));
 
         if (empty($driver) || (strcmp($driver, 'none') == 0)) {
-            return new Auth;
+            $result = new Auth;
+            return $result;
         }
 
         if (!empty($app)) {
@@ -146,7 +147,8 @@
      */
     function addUser($userID, $credentials)
     {
-        return new PEAR_Error('unsupported');
+        $result = new PEAR_Error('unsupported');
+        return $result;
     }
 
     /**
@@ -160,7 +162,8 @@
      */
     function updateUser($oldID, $newID, $credentials)
     {
-        return new PEAR_Error('unsupported');
+        $result = new PEAR_Error('unsupported');
+        return $result;
     }
 
     /**
@@ -172,7 +175,8 @@
      */
     function removeUser($userID)
     {
-        return new PEAR_Error('unsupported');
+        $result = new PEAR_Error('unsupported');
+        return $result;
     }
 
     /**
@@ -182,7 +186,8 @@
      */
     function listUsers()
     {
-        return new PEAR_Error('unsupported');
+        $result = new PEAR_Error('unsupported');
+        return $result;
     }
 
     /**
--- ./turba/lib/Driver.php.deb  2005-08-15 20:32:54.012715792 +0200
+++ ./turba/lib/Driver.php      2005-08-15 20:34:32.060914009 +0200
@@ -39,7 +39,8 @@
         include_once dirname(__FILE__) . '/Driver/' . $driver . '.php';
         $class = 'Turba_Driver_' . $driver;
         if (class_exists($class)) {
-            return new $class($params);
+            $result = new $class($params);
+            return $result;
         } else {
             Horde::fatal(new PEAR_Error(sprintf(_("Unable to load the 
definition of %s."), $class)), __FILE__, __LINE__);
         }
--- ./turba/lib/Source.php.deb  2005-08-15 20:32:54.017714987 +0200
+++ ./turba/lib/Source.php      2005-08-15 20:34:32.063913526 +0200
@@ -59,7 +59,8 @@
 
         $object->driver = &Turba_Driver::singleton($source['type'], 
$source['params']);
         if (!empty($object->driver->errno)) {
-            return new PEAR_Error("Failed to load $name: 
[{$object->driver->errno}] {$object->driver->errstr}");
+            $result = new PEAR_Error("Failed to load $name: 
[{$object->driver->errno}] {$object->driver->errstr}");
+            return $result;
         }
 
         /* Store and translate the map at the Source level. */
@@ -252,12 +253,14 @@
                 }
 
                 if (class_exists($class)) {
-                    return new $class($this, $remapped_objects[0]);
+                    $result = new $class($this, $remapped_objects[0]);
+                    return $result;
                 }
             }
 
             require_once TURBA_BASE . '/lib/Object.php';
-            return new Turba_Object($this, $remapped_objects[0]);
+            $result = new Turba_Object($this, $remapped_objects[0]);
+            return $result;
         }
     }
 
--- ./turba/lib/api.php.deb     2005-08-15 20:32:54.023714020 +0200
+++ ./turba/lib/api.php 2005-08-15 20:34:32.067912881 +0200
@@ -79,7 +79,8 @@
         if (isset($cfgSources[$source])) {
             $driver = &Turba_Source::singleton($source, $cfgSources[$source]);
             if (PEAR::isError($driver)) {
-                return new PEAR_Error(_("Failed to connect to the specified 
directory."), HORDE_ERROR, null, null, $source);
+                $result = new PEAR_Error(_("Failed to connect to the specified 
directory."), HORDE_ERROR, null, null, $source);
+                return $result;
             }
 
             foreach ($names as $name) {
@@ -181,7 +182,8 @@
 
     $driver = &Turba_Source::singleton($addressbook, 
$cfgSources[$addressbook]);
     if (PEAR::isError($driver)) {
-        return new PEAR_Error(_("Failed to connect to the specified 
directory."), HORDE_ERROR, null, null, $addressbook);
+        $result = new PEAR_Error(_("Failed to connect to the specified 
directory."), HORDE_ERROR, null, null, $addressbook);
+        return $result;
     }
     $res = $driver->search(array('name' => $name, 'email' => $address), 
'lastname', TURBA_SEARCH_AND);
     if (PEAR::isError($res) || $res->count() > 0) {
--- ./turba/lib/Driver/ldap.php.deb     2005-08-15 20:32:54.043710797 +0200
+++ ./turba/lib/Driver/ldap.php 2005-08-15 20:34:32.071912237 +0200
@@ -278,9 +278,11 @@
     function addObject($attributes)
     {
         if (!isset($attributes['dn'])) {
-            return new PEAR_Error('Tried to add an object with no dn: [' . 
serialize($attributes) . '].');
+            $result = new PEAR_Error('Tried to add an object with no dn: [' . 
serialize($attributes) . '].');
+            return $result;
         } elseif (!isset($this->params['objectclass'])) {
-            return new PEAR_Error('Tried to add an object with no objectclass: 
[' . serialize($attributes) . '].');
+            $result = new PEAR_Error('Tried to add an object with no 
objectclass: [' . serialize($attributes) . '].');
+            return $result;
         }
 
         // Take the DN out of the attributes array
@@ -312,7 +314,8 @@
         }
 
         if ([EMAIL PROTECTED]($this->ds, $dn, $attributes)) {
-            return new PEAR_Error('Failed to add an object: [' . 
ldap_errno($this->ds) . '] "' . ldap_error($this->ds) . '" (attributes: [' . 
serialize($attributes) . ']).');
+            $result = new PEAR_Error('Failed to add an object: [' . 
ldap_errno($this->ds) . '] "' . ldap_error($this->ds) . '" (attributes: [' . 
serialize($attributes) . ']).');
+            return $result;
         } else {
             return true;
         }
--- ./imp/compose.php.deb       2005-08-15 20:32:54.060708058 +0200
+++ ./imp/compose.php   2005-08-15 20:34:32.077911270 +0200
@@ -226,7 +226,8 @@
         }
         return $arr;
     } elseif ($error) {
-        return new PEAR_Error(_("Please resolve ambiguous or invalid 
addresses."), null, null, null, $res);
+        $result = new PEAR_Error(_("Please resolve ambiguous or invalid 
addresses."), null, null, null, $res);
+        return $result;
     } else {
         return implode(', ', $arr);
     }
--- ./passwd/lib/Driver/sql.php.deb     2005-08-15 20:32:54.093702740 +0200
+++ ./passwd/lib/Driver/sql.php 2005-08-15 20:34:32.086909820 +0200
@@ -134,7 +134,8 @@
                 return $this->comparePasswords($currentPassword, $oldPassword);
             }
         }
-        return new PEAR_Error(_("User not found"));
+        $result = new PEAR_Error(_("User not found"));
+        return $result;
     }
 
     /**
--- ./passwd/lib/Driver/vpopmail.php.deb        2005-08-15 20:32:54.101701451 
+0200
+++ ./passwd/lib/Driver/vpopmail.php    2005-08-15 20:34:32.089909336 +0200
@@ -142,7 +142,8 @@
                 return $this->comparePasswords($currentPassword, $oldPassword);
             }
         }
-        return new PEAR_Error(_("User not found"));
+        $result = new PEAR_Error(_("User not found"));
+        return $result;
     }
 
     /**
--- ./passwd/lib/Driver.php.deb 2005-08-15 20:32:54.145694361 +0200
+++ ./passwd/lib/Driver.php     2005-08-15 20:34:32.092908853 +0200
@@ -37,7 +37,8 @@
         @include_once dirname(__FILE__) . '/Driver/' . $driver . '.php';
         $class = 'Passwd_Driver_' . $driver;
         if (class_exists($class)) {
-            return new $class($params);
+            $result = new $class($params);
+            return $result;
         } else {
             return false;
         }
@@ -215,7 +216,8 @@
      */
 
     function change_password($user_name, $old_password, $new_password) {
-        return new PEAR_Error(_("Backend not correctly implemented."));
+        $result = new PEAR_Error(_("Backend not correctly implemented."));
+        return $result;
     }
 
     /**

Reply via email to