From: Gunnar Wrobel
Date: Tue, 14 Apr 2009 20:21:14 +0000 (+0200) Subject: Add a function to simply remove an attribute when collapsing values. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3777930040169c834a40ec87cada049df4c93c07;p=horde.git Add a function to simply remove an attribute when collapsing values. --- diff --git a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php index 2648109b4..f9939a799 100644 --- a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php +++ b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php @@ -583,6 +583,24 @@ class Horde_Kolab_Server_Object } /** + * Simply remove an attribute so that it does not get transported + * to the server (it might have been needed before e.g. ID + * generation). + * + * @param string $key The attribute to collapse into. + * @param array $attributes The attributes to collapse. + * @param array $info The information currently working on. + * + * @return NULL. + */ + protected function removeAttribute($key, $attributes, &$info) + { + foreach ($attributes as $attribute) { + unset($info[$attribute]); + } + } + + /** * Get an empty value * * @return string An empty string. @@ -597,8 +615,6 @@ class Horde_Kolab_Server_Object * * @param array $info The data of the object. * - * @static - * * @return string The ID. */ public function generateId($info)