From: cajus Date: Thu, 3 Apr 2008 15:04:10 +0000 (+0000) Subject: Update for skip-list X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d95d2162852d5d798e4eeeba919d072294b089ee;p=gosa.git Update for skip-list git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10176 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index c852f48bf..580be7939 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -496,7 +496,7 @@ class plugin } /* Adapt from template, using 'dn' */ - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { /* Include global link_info */ $ldap= $this->config->get_ldap_link(); @@ -508,6 +508,11 @@ class plugin /* Walk through attributes */ foreach ($this->attributes as $val){ + /* Skip the ones in skip list */ + if (in_array($val, $skip)){ + continue; + } + if (isset($this->attrs["$val"][0])){ /* If attribute is set, replace dynamic parts: diff --git a/gosa-core/include/class_tabs.inc b/gosa-core/include/class_tabs.inc index 469a2c0bd..d11d24b42 100644 --- a/gosa-core/include/class_tabs.inc +++ b/gosa-core/include/class_tabs.inc @@ -291,13 +291,13 @@ class tabs return (0); } - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { foreach ($this->by_object as $key => &$obj){ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $key, "Adapting"); $obj->parent= &$this; - $obj->adapt_from_template($dn); + $obj->adapt_from_template($dn, $skip); } }