index 20a421455a14cca1e72c837000ecf2b17f86b73f..b4bdc2962562fe5a5a8d1c9cd3ae86f04cccd983 100644 (file)
var $uid = ""; // User id
var $cn = ""; // cn
+ var $orig_cn = ""; // cn
var $method = "mailMethod"; // Used Mail method
var $mmethod = ""; // Contains the gosa.conf MAILMETHOD
var $indexed_acl= array();
var $indexed_user= array();
+ /* Copy & paste */
+ var $CopyPasteVars = array("quotaUsage","imapacl");
+
/* attribute list for save action */
var $attributes= array( "mail", "gosaMailServer", "gosaMailQuota", "gosaMailMaxSize",
"gosaMailAlternateAddress", "gosaMailForwardingAddress",
*/
plugin::plugin($config, $dn, $parent);
+ /* Save initial cn */
+ $this->orig_cn = $this->cn;
+
/* Set mailMethod to the one defined in gosa.conf
*/
if (isset($this->config->current['MAILMETHOD'])){
$display .= "<h2>Shared folder delete options</h2>
<input class='center' type='checkbox' name='remove_folder_from_imap' value='1' ".$c."
- title='"._("Remove shared folder from mail server database")."'>";
- $display .= _("Remove the shared folder and all its contents from mail server.");
+ title='"._("Remove shared folder from mail server database when entry gets removed in LDAP")."'>";
+ $display .= _("Remove the shared folder and all its contents after saving this account");
}
return ($display);
if ($this->initially_was_account){
$method= new $this->method($this->config);
+ $method->fixAttributesOnRemove($this);
if ($method->connect($this->gosaMailServer) && $this->remove_folder_from_imap){
/* Remove account from IMAP server */
$method->deleteMailbox($this->uid);
$method->disconnect();
}
- $method->fixAttributesOnRemove($this);
}
/* Keep uid */
unset ($this->attrs['uid']);
}
$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.");
}
}
}
+ function PrepareForCopyPaste($source)
+ {
+ plugin::PrepareForCopyPaste($source);
+ /* Reset alternate mail addresses */
+ $this->gosaMailAlternateAddress = array();
+ }
}
-
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>