Code

added group C&P fixes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 16 Nov 2006 04:26:27 +0000 (04:26 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 16 Nov 2006 04:26:27 +0000 (04:26 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5131 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupGeneric.inc
plugins/admin/groups/class_groupMail.inc
plugins/admin/groups/paste_generic.tpl

index a03f6a91ec3a8ac9c53f8ac9b120a2cae6d5d8ec..fa59242979149b057449fd45f58db6c3ebb2c39f 100644 (file)
@@ -44,6 +44,8 @@ class group extends plugin
   var $attributes= array("cn", "description", "gidNumber","memberUid","sambaGroupType","sambaSID");
   var $objectclasses= array("top", "posixGroup");
 
+  var $CopyPasteVars  = array("force_gid","fon_group","smbgroup","groupType","sambaSID","sambaDomainName","SID","nagios_group","sambaGroupType");
+
   function group ($config, $dn= NULL)
   {
     plugin::plugin ($config, $dn);
index 13b378c3c2921ce70a42683ed5669132a354d7a3..f836f5281f372d66884c6ffc379cde0b94594835 100644 (file)
@@ -9,6 +9,7 @@ class mailgroup extends plugin
 
   var $uid                        = "";       // User id 
   var $cn                         = "";       // cn
+  var $orig_cn                    = "";       // cn
 
   var $method                     = "mailMethod"; // Used Mail method 
   var $mmethod                    = "";           // Contains the gosa.conf MAILMETHOD
@@ -54,7 +55,7 @@ class mailgroup extends plugin
       "acl","gosaSharedFolderTarget", "gosaVacationMessage");
 
   var $objectclasses= array("gosaMailAccount");
-
+  var $CopyPasteVars          = array("quotaUsage","imapacl");
 
   function mailgroup ($config, $dn= NULL, $ui= NULL)
   {
@@ -62,6 +63,8 @@ class mailgroup extends plugin
      */
     plugin::plugin($config, $dn);
 
+    $this->orig_cn = $this->cn;
+
     /* Set mailMethod to the one defined in gosa.conf 
      */
     if (isset($this->config->current['MAILMETHOD'])){
@@ -881,7 +884,7 @@ I: Only insider delivery */
     }
     $ldap->cd($this->config->current['BASE']);
     $ldap->search ("(&(!(objectClass=gosaUserTemplate))(objectClass=gosaMailAccount)(|(mail=".$this->mail.")(gosaMailAlternateAddress=".
-        $this->mail."))(!(uid=".$this->cn."))(!(cn=".$this->cn.")))");
+        $this->mail."))(!(uid=".$this->orig_cn."))(!(cn=".$this->orig_cn.")))");
     if ($ldap->count() != 0){
       $message[]= _("The primary address you've entered is already in use.");
     }
@@ -1047,6 +1050,15 @@ I: Only insider delivery */
   }
 
 
+  function PrepareForCopyPaste($source)
+  {
+    plugin::PrepareForCopyPaste($source);
+    /* Reset alternate mail addresses */
+    $this->gosaMailAlternateAddress = array();
+  }
+
+
   /* Return plugin informations for acl handling  */
   function plInfo()
   {
index 6b98184b26b9c53f68b7482ebddb6fcb162684ef..f08d2431520a3986bb8e3af24587261d729af261 100644 (file)
@@ -11,7 +11,7 @@
        <tr>
                <td>
                        <input type=checkbox name='force_gid' value='1' {$used} title='{t}Normally IDs are autogenerated, select to specify manually{/t}' 
-                               onclick='changeState(\"gidNumber\")'>
+                               onclick='changeState("gidNumber")'>
                        <LABEL for='gidNumber'>{t}Force GID{/t}</LABEL>
                </td>
                <td>