From 78f7965f1b3861b888968b4e60b2daa72b5071d2 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 9 Nov 2006 05:50:49 +0000 Subject: [PATCH] Fixed Copy & Paste for posix account. -Home directory wasn't used. -gid/uidNumber wasn't used. -goupMembership was not created. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5051 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/posix/class_posixAccount.inc | 24 +++++++++++++++++-- plugins/personal/posix/paste_generic.tpl | 4 ++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index 1cebfa35b..fca536fb9 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -67,7 +67,7 @@ class posixAccount extends plugin var $SubSearch = false; /* attribute list for save action */ - var $CopyPasteVars = array("grouplist","groupMembership","use_shadowMin","use_shadowMax","use_shadowWarning","use_shadowInactive","use_shadowExpire","must_change_password","force_ids","printerList","grouplist","savedGidNumber","savedUidNumber","savedGroupMembership"); + var $CopyPasteVars = array("grouplist","groupMembership","use_shadowMin","use_shadowMax","use_shadowWarning","use_shadowInactive","use_shadowExpire","must_change_password","printerList","grouplist","savedGidNumber","savedUidNumber"); var $attributes = array("homeDirectory", "loginShell", "uidNumber", "gidNumber", "gecos", "shadowMin", "shadowMax", "shadowWarning", "shadowInactive", "shadowLastChange", "shadowExpire", "gosaDefaultPrinter", "gosaDefaultLanguage", "uid","accessTo","trustModel"); @@ -1162,11 +1162,31 @@ class posixAccount extends plugin reset ($this->grouplist); } + + /* Get posts from copy & paste dialog */ + function saveCopyDialog() + { + if(isset($_POST['homeDirectory'])){ + $this->homeDirectory = $_POST['homeDirectory']; + if (isset ($_POST['force_ids'])){ + $data= 1; + $this->gidNumber = $_POST['gidNumber']; + $this->uidNumber = $_POST['uidNumber']; + } else { + $data= 0; + } + if ($this->force_ids != $data){ + $this->is_modified= TRUE; + } + $this->force_ids= $data; + } + } + /* Create the posix dialog part for copy & paste */ function getCopyDialog() { - /* Skip dialog creation if this is not a valid account*/ + /* Skip dialog creation if this is not a valid account */ if(!$this->is_account) return(""); if ($this->force_ids == 1){ $force_ids = "checked"; diff --git a/plugins/personal/posix/paste_generic.tpl b/plugins/personal/posix/paste_generic.tpl index f97374c69..df91ef880 100644 --- a/plugins/personal/posix/paste_generic.tpl +++ b/plugins/personal/posix/paste_generic.tpl @@ -1,7 +1,7 @@

{t}Posix settings{/t}

-
+
@@ -12,7 +12,7 @@
- +