From c8241ba453984f7d996a5f395d0d650eb0d3d81a Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 31 Mar 2008 12:45:49 +0000 Subject: [PATCH] Added skip values git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10085 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/plugins/admin/acl/class_aclManagement.inc | 2 +- gosa-core/plugins/admin/groups/class_groupManagement.inc | 2 +- gosa-core/plugins/personal/generic/class_user.inc | 8 ++++---- gosa-core/plugins/personal/posix/class_posixAccount.inc | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc index 65af9065b..342a16e99 100644 --- a/gosa-core/plugins/admin/acl/class_aclManagement.inc +++ b/gosa-core/plugins/admin/acl/class_aclManagement.inc @@ -641,7 +641,7 @@ class aclManagement extends plugin echo "SAVE ACL"; } - function adapt_from_template($dn) { } + function adapt_from_template($dn, $skip) { } function password_change_needed() { } diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc index 4a2aa2a2c..00d014644 100644 --- a/gosa-core/plugins/admin/groups/class_groupManagement.inc +++ b/gosa-core/plugins/admin/groups/class_groupManagement.inc @@ -788,7 +788,7 @@ class groupManagement extends plugin /* Unused functions */ function check() { } - function adapt_from_template($dn) { } + function adapt_from_template($dn, $skip) { } function password_change_needed() { } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc index 1ad2c9264..aa37dc920 100644 --- a/gosa-core/plugins/personal/generic/class_user.inc +++ b/gosa-core/plugins/personal/generic/class_user.inc @@ -1300,9 +1300,9 @@ class user extends plugin } /* Adapt from given 'dn' */ - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { - plugin::adapt_from_template($dn); + plugin::adapt_from_template($dn, $skip); /* Get base */ $this->base= preg_replace('/^[^,]+,'.get_people_ou().'/i', '', $dn); @@ -1329,8 +1329,8 @@ class user extends plugin } } - /* Get back uid/sn/givenName */ - if ($this->parent !== NULL){ + /* Get back uid/sn/givenName - only write if nothing's skipped */ + if ($this->parent !== NULL && count($skip) != 0){ $this->uid= $this->parent->uid; $this->sn= $this->parent->sn; $this->givenName= $this->parent->givenName; diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc index a2bcd4c56..596f519df 100644 --- a/gosa-core/plugins/personal/posix/class_posixAccount.inc +++ b/gosa-core/plugins/personal/posix/class_posixAccount.inc @@ -1175,12 +1175,12 @@ class posixAccount extends 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(); - plugin::adapt_from_template($dn); + plugin::adapt_from_template($dn, $skip); $template= $this->attrs['uid'][0]; /* Adapt group membership */ -- 2.30.2