From: cajus Date: Mon, 31 Mar 2008 13:01:15 +0000 (+0000) Subject: Added skip to plugins X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=260098e3197cce439b3ca83d745ecf3e70dc147b;p=gosa.git Added skip to plugins git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10088 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/connectivity/personal/connectivity/class_connectivity.inc b/gosa-plugins/connectivity/personal/connectivity/class_connectivity.inc index c3669ae08..7da84e1b8 100644 --- a/gosa-plugins/connectivity/personal/connectivity/class_connectivity.inc +++ b/gosa-plugins/connectivity/personal/connectivity/class_connectivity.inc @@ -170,12 +170,12 @@ class connectivity extends plugin } } - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { /* Adapt objects */ foreach ($this->plugin_name as $name){ $this->plugin[$name]->dn= $this->dn; - $this->plugin[$name]->adapt_from_template($dn); + $this->plugin[$name]->adapt_from_template($dn, $skip); } } diff --git a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc index c88352019..d73f6fc02 100644 --- a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc +++ b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc @@ -800,13 +800,17 @@ class gofaxAccount extends plugin /* Adapt from template, using 'dn' */ - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { - plugin::adapt_from_template($dn); + plugin::adapt_from_template($dn, $skip); foreach (array("goFaxRBlocklist", "goFaxRBlockgroups", "goFaxSBlocklist", "goFaxSBlockgroups", "facsimileAlternateTelephoneNumber") as $val){ + if (in_array($val, $skip)){ + continue(); + } + if (isset($this->attrs[$val])){ $this->$val= $this->attrs[$val]; } diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc index aa51a7ee8..da1656692 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc @@ -544,7 +544,7 @@ class goFonMacro extends plugin } - function adapt_from_template($dn) { } + function adapt_from_template($dn, $skip= array()) { } function check() { } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc index 70af9a0ee..33ea306b5 100644 --- a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc +++ b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc @@ -1292,12 +1292,12 @@ class phoneAccount extends plugin } - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { - plugin::adapt_from_template($dn); + plugin::adapt_from_template($dn, $skip); /* Assemble phone numbers */ - if (isset($this->attrs['telephoneNumber'])){ + if (isset($this->attrs['telephoneNumber']) && !in_array("telephoneNumber", $skip)){ for ($i= 0; $i<$this->attrs['telephoneNumber']['count']; $i++){ $number= $this->attrs['telephoneNumber'][$i]; $this->phoneNumbers[$number]= $number; diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc index f30035e89..314837402 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc @@ -633,7 +633,7 @@ class applicationManagement extends plugin } function check() {} - function adapt_from_template($dn) {} + function adapt_from_template($dn, $skip= array()) {} function password_change_needed() {} } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc index 3fb57beba..34b226811 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc @@ -651,7 +651,7 @@ class mimetypeManagement extends plugin } function check() {} - function adapt_from_template($dn) {} + function adapt_from_template($dn, $skip= array()) {} function password_change_needed() {} } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc b/gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc index f40df83ae..640abf3c3 100644 --- a/gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc +++ b/gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc @@ -614,17 +614,22 @@ class kolabAccount extends plugin } /* Adapt from template, using 'dn' */ - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { - plugin::adapt_from_template($dn); + plugin::adapt_from_template($dn, $skip); /* Setting uid to default */ - if(isset($this->attrs['uid'][0])){ + if(isset($this->attrs['uid'][0]) && !in_array("uid", $skip)){ $this->uid = $this->attrs['uid'][0]; } /* Pull arrays */ foreach(array("kolabDelegate", "kolabInvitationPolicy") as $attr){ + + if (in_array($val, $skip)){ + continue; + } + if (isset($this->attrs["$attr"]["count"])){ $tmp = array(); for ($i= 0; $i<$this->attrs["$attr"]["count"]; $i++){ diff --git a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc index 3a7f6284c..921ad96ea 100644 --- a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc +++ b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc @@ -1065,11 +1065,16 @@ I: Only insider delivery */ } /* Adapt from template, using 'dn' */ - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { - plugin::adapt_from_template($dn); + plugin::adapt_from_template($dn, $skip); foreach (array("gosaMailAlternateAddress", "gosaMailForwardingAddress") as $val){ + + if (in_array($val, $skip)){ + continue; + } + $this->$val= array(); if (isset($this->attrs["$val"]["count"])){ for ($i= 0; $i<$this->attrs["$val"]["count"]; $i++){ diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc index b4a2eae80..8fd0ab2a8 100644 --- a/gosa-plugins/mail/personal/mail/class_mailAccount.inc +++ b/gosa-plugins/mail/personal/mail/class_mailAccount.inc @@ -982,11 +982,16 @@ class mailAccount extends plugin /* Adapt from template, using 'dn' */ - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { - plugin::adapt_from_template($dn); + plugin::adapt_from_template($dn, $skip); foreach (array("gosaMailAlternateAddress", "gosaMailForwardingAddress") as $val){ + + if (in_array($val, $skip)){ + continue; + } + $this->$val= array(); if (isset($this->attrs["$val"]["count"])){ for ($i= 0; $i<$this->attrs["$val"]["count"]; $i++){ diff --git a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc index 65830c6d5..eb19275f6 100644 --- a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc +++ b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc @@ -1119,33 +1119,33 @@ class sambaAccount extends plugin } - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { - plugin::adapt_from_template($dn); + plugin::adapt_from_template($dn, $skip); $this->sambaSID= ""; $this->sambaPrimaryGroupSID= ""; /* Fill mungedDial field */ - if ($this->samba3 && isset($this->attrs['sambaMungedDial'])){ + if ($this->samba3 && isset($this->attrs['sambaMungedDial']) && !in_array('sambaMungedDial', $skip)){ $this->mungedObject->load($this->sambaMungedDial); } /* Password expiery */ if(isset($this->attrs['sambaPwdMustChange']) && - $this->attrs['sambaPwdMustChange'][0] != 0){ + $this->attrs['sambaPwdMustChange'][0] != 0 && !in_array('sambaPwdMustChange', $skip)){ $this->password_expires= 1; } if(isset($this->attrs['sambaLogonTime']) && ! ( $this->attrs['sambaLogonTime'][0] == 0 || $this->attrs['sambaLogonTime'][0] == 2147483647 - )){ + ) && !in_array('sambaLogonTime', $skip)){ $this->logon_time_set= 1; } if(isset($this->attrs['sambaLogoffTime']) && ! ( $this->attrs['sambaLogoffTime'][0] == 0 || $this->attrs['sambaLogoffTime'][0] == 2147483647 - )){ + ) && !in_array('sambaLogonTime', $skip)){ $this->logoff_time_set= 1; } @@ -1153,7 +1153,7 @@ class sambaAccount extends plugin if(isset($this->attrs['sambaKickoffTime']) && ! ( $this->attrs['sambaKickoffTime'][0] == 0 || $this->attrs['sambaKickoffTime'][0] == 2147483647 - )){ + ) && !in_array('sambaKickoffTime', $skip)){ $this->kickoff_time_set= 1; } diff --git a/gosa-plugins/scalix/personal/scalix/class_scalixAccount.inc b/gosa-plugins/scalix/personal/scalix/class_scalixAccount.inc index dd00a6e2f..7961bbf3c 100644 --- a/gosa-plugins/scalix/personal/scalix/class_scalixAccount.inc +++ b/gosa-plugins/scalix/personal/scalix/class_scalixAccount.inc @@ -377,11 +377,16 @@ class scalixAccount extends plugin } /* Adapt from template, using 'dn' */ - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { - plugin::adapt_from_template($dn); + plugin::adapt_from_template($dn, $skip); foreach (array("scalixEmailAddress") as $val){ + + if (in_array($val, $skip)){ + continue; + } + $this->$val= array(); if (isset($this->attrs["$val"]["count"])){ for ($i= 0; $i<$this->attrs["$val"]["count"]; $i++){ diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 918439ba3..f56f05f78 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -1050,7 +1050,7 @@ class systems extends plugin { } - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { }