index 23ff9c64e8768c718166dca6ccbf3d434b36104a..874391ba46e3a63685c5273964036bf4bdc9bf94 100644 (file)
var $gosaVacationMessage= "";
var $gosaSpamSortLevel= "";
var $gosaSpamMailbox= "";
var $gosaVacationMessage= "";
var $gosaSpamSortLevel= "";
var $gosaSpamMailbox= "";
-
+ var $gosaSharedFolderTarget;
var $quotaUsage= 0;
var $forward_dialog= FALSE;
var $members= array();
var $mailusers= array();
var $perms= array();
var $imapacl= array('anyone' => 'p', '%members%' => 'lrsp', '' => 'p');
var $quotaUsage= 0;
var $forward_dialog= FALSE;
var $members= array();
var $mailusers= array();
var $perms= array();
var $imapacl= array('anyone' => 'p', '%members%' => 'lrsp', '' => 'p');
+ var $mmethod= "";
/* Helper */
var $indexed_acl= array();
var $indexed_user= array();
/* attribute list for save action */
/* Helper */
var $indexed_acl= array();
var $indexed_user= array();
/* attribute list for save action */
- var $attributes= array("mail", "gosaMailServer", "gosaMailQuota", "gosaMailMaxSize",
- "gosaMailDeliveryMode", "gosaSpamSortLevel", "gosaSpamMailbox",
+ var $attributes= array("mail", "gosaMailServer", "gosaMailQuota", "gosaMailMaxSize","gosaMailAlternateAddress","gosaMailForwardingAddress",
+ "gosaMailDeliveryMode", "gosaSpamSortLevel", "gosaSpamMailbox","acl","gosaSharedFolderTarget",
"gosaVacationMessage");
var $objectclasses= array("gosaMailAccount");
"gosaVacationMessage");
var $objectclasses= array("gosaMailAccount");
/* Set mailMethod to the one defined in gosa.conf */
if (isset($this->config->current['MAILMETHOD'])){
/* Set mailMethod to the one defined in gosa.conf */
if (isset($this->config->current['MAILMETHOD'])){
- $method= $this->config->current['MAILMETHOD'];
- if (class_exists("mailMethod$method")){
- $this->method= "mailMethod$method";
- } else {
- print_red(sprintf(_("There is no mail method '%s' specified in your gosa.conf available."), $method));
- }
+ $this->mmethod= $this->config->current['MAILMETHOD'];
}
}
+
+ if (class_exists("mailMethod$this->mmethod")){
+ $this->method= "mailMethod$this->mmethod";
+ } else {
+ print_red(sprintf(_("There is no mail method '%s' specified in your gosa.conf available."), $this->mmethod));
+ }
+
+ /* Load Mailserver string, only in case of kolab ???? */
+ if(preg_match("/kolab/i",$this->mmethod)){
+ if(isset($this->attrs['gosaMailServer'][0])){
+ $this->gosaMailServer = $this->attrs['gosaMailServer'][0];
+ }
+ }
/* Convert cn to uid in case of existing entries */
if (isset($this->attrs['cn'][0])){
/* Convert cn to uid in case of existing entries */
if (isset($this->attrs['cn'][0])){
/* Load attributes containing arrays */
foreach (array("gosaMailAlternateAddress", "gosaMailForwardingAddress") as $val){
/* Load attributes containing arrays */
foreach (array("gosaMailAlternateAddress", "gosaMailForwardingAddress") as $val){
+ $this->$val = array();
if (isset($this->attrs["$val"]["count"])){
for ($i= 0; $i<$this->attrs["$val"]["count"]; $i++){
array_push($this->$val, $this->attrs["$val"][$i]);
if (isset($this->attrs["$val"]["count"])){
for ($i= 0; $i<$this->attrs["$val"]["count"]; $i++){
array_push($this->$val, $this->attrs["$val"][$i]);
unset($this->imapacl[$user]);
}
}
unset($this->imapacl[$user]);
}
}
-
+
}
}
-
+
/* Update quota values */
/* Update quota values */
- $this->quotaUsage= $quota['quotaUsage'];
- $this->gosaMailQuota= $quota['gosaMailQuota'];
+ if ($quota['gosaMailQuota'] == 2147483647){
+ $this->quotaUsage= "";
+ $this->gosaMailQuota= "";
+ } else {
+ $this->quotaUsage= $quota['quotaUsage'];
+ $this->gosaMailQuota= $quota['gosaMailQuota'];
+ }
$method->disconnect();
}
$method->disconnect();
}
+ /* Adapt attributes if needed */
+ $method->fixAttributesOnLoad($this);
}
}
-
}
/* Get global filter config */
}
/* Get global filter config */
- if (!is_global("mailfilter")){
+ if (!is_global("gmailfilter")){
$ui= get_userinfo();
$base= get_base_from_people($ui->dn);
$ui= get_userinfo();
$base= get_base_from_people($ui->dn);
- $mailfilter= array( "depselect" => $base,
+ $gmailfilter= array( "depselect" => $base,
"muser" => "",
"regex" => "*");
"muser" => "",
"regex" => "*");
- register_global("mailfilter", $mailfilter);
+ register_global("gmailfilter", $gmailfilter);
}
/* Load permissions */
}
/* Load permissions */
- if (isset($this->attrs['acl'])){
- for ($i= 0; $i<$this->attrs['acl']['count']; $i++){
- list($user, $permission)= split(' ', $this->attrs['acl'][$i]);
- $this->imapacl[$user]= $permission;
- if ($user != "anyone" && $user != "%members%"){
- unset($this->imapacl['']);
+ $tmp = array();
+ if(preg_match("/kolab/i",$this->mmethod)){
+ $ldap = $this->config->get_ldap_link();
+ if (isset($this->attrs['acl'])){
+ for ($i= 0; $i<$this->attrs['acl']['count']; $i++){
+ list($user, $permission)= split(' ', $this->attrs['acl'][$i]);
+
+ /* Add to list */
+ $this->imapacl[$user]= $permission;
+
+ /* Get all user permissions sorted by acl, to detect the most used acl
+ This acl is then used for %members%
+ */
+ $tmp[$permission][] = $user;
+
+ /* There is an entry in $this->imapacl like this this ...
+ $this->attrs['imapacl']['anyone'] = "p";
+ $this->attrs['imapacl']['%members%'] = "lprs";
+ $this->attrs['imapacl'][''] = ""; <------ This is used to diplay an empty
+ Field for special acls in our template.
+ If there is at least one special acl in out imapacl,
+ we don't need this entry anymore, because it is already displayed.
+ */
+ if ($user != "anyone" && $user != "%members%"){
+ unset($this->imapacl['']);
+ }
}
}
}
}
- }
+ /* In this section we dectect which acl is tho most used
+ This will be used as %members% acl
+ */
+ $tmp2 = array();
+ foreach($tmp as $acl => $user){
+ $tmp2[count($tmp[$acl])]=$acl;
+ }
+ /* Most used at last */
+ ksort($tmp2);
+
+ /* Assign last (most used acl) to %members% acl */
+ $this->imapacl['%members%']=array_pop($tmp2);
+
+ /* Open ldap connection */
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+
+ /* Remove those users, that use %members% acl && are member of this group. */
+ foreach($this->imapacl as $mail => $permission){
+ $ldap->search("(&(objectClass=person)(mail=".$mail."))",array("uid"));
+ $atr = $ldap->fetch();
+ if((isset($atr['uid'][0]))&&(in_array($atr['uid'][0],$this->attrs['memberUid']))&&($permission == $this->imapacl['%members%'])){
+ unset($this->imapacl[$mail]);
+ }
+ }
+
+ /* Append an empty entry, for special acl handling */
+ if(count($this->imapacl)==2){
+ $this->imapacl[''] ="";
+ }
+ }else{
+ /* Load permissions */
+ if (isset($this->attrs['acl'])){
+ for ($i= 0; $i<$this->attrs['acl']['count']; $i++){
+ list($user, $permission)= split(' ', $this->attrs['acl'][$i]);
+ $this->imapacl[$user]= $permission;
+ if ($user != "anyone" && $user != "%members%"){
+ unset($this->imapacl['']);
+ }
+ }
+ }
+ }
/* Fill translations */
$this->perms["lrs"]= _("read");
$this->perms["lrsp"]= _("post");
/* Fill translations */
$this->perms["lrs"]= _("read");
$this->perms["lrsp"]= _("post");
function execute()
{
function execute()
{
+ /* Call parent execute */
+ //plugin::execute();
+
/* Load templating engine */
$smarty= get_smarty();
if ($_SESSION['js']==FALSE){
/* Load templating engine */
$smarty= get_smarty();
if ($_SESSION['js']==FALSE){
/* Do we represent a valid account? */
if (!$this->is_account && $this->parent == NULL){
/* Do we represent a valid account? */
if (!$this->is_account && $this->parent == NULL){
- $display= "<img src=\"images/stop.png\" align=center> <b>".
+ $display= "<img alt=\"\" src=\"images/stop.png\" align=middle> <b>".
_("This 'dn' has no valid mail extensions.")."</b>";
return ($display);
}
_("This 'dn' has no valid mail extensions.")."</b>";
return ($display);
}
/* Delete forward email addresses */
if (isset($_POST['delete_forwarder'])){
/* Delete forward email addresses */
if (isset($_POST['delete_forwarder'])){
- if (count($_POST['forwarder_list'])
+ if (count($_POST['forwarder_list'])
&& chkacl ($this->acl, "gosaMailForwardingAddress") == ""){
$this->delForwarder ($_POST['forwarder_list']);
&& chkacl ($this->acl, "gosaMailForwardingAddress") == ""){
$this->delForwarder ($_POST['forwarder_list']);
$ldap= $this->config->get_ldap_link();
/* Save data */
$ldap= $this->config->get_ldap_link();
/* Save data */
- $mailfilter= get_global("mailfilter");
+ $gmailfilter= get_global("gmailfilter");
foreach( array("depselect", "muser", "regex") as $type){
if (isset($_POST[$type])){
foreach( array("depselect", "muser", "regex") as $type){
if (isset($_POST[$type])){
- $mailfilter[$type]= $_POST[$type];
+ $gmailfilter[$type]= $_POST[$type];
}
}
if (isset($_GET['search'])){
}
}
if (isset($_GET['search'])){
if ($s == "**"){
$s= "*";
}
if ($s == "**"){
$s= "*";
}
- $mailfilter['regex']= $s;
+ $gmailfilter['regex']= $s;
}
}
- register_global("mailfilter", $mailfilter);
+ register_global("gmailfilter", $gmailfilter);
/* Get actual list */
$mailusers= array ();
/* Get actual list */
$mailusers= array ();
- if ($mailfilter['regex'] != '*' && $mailfilter['regex'] != ""){
- $regex= $mailfilter['regex'];
+ if ($gmailfilter['regex'] != '*' && $gmailfilter['regex'] != ""){
+ $regex= $gmailfilter['regex'];
$filter= "(|(mail=$regex)(gosaMailAlternateAddress=$regex))";
} else {
$filter= "";
}
$filter= "(|(mail=$regex)(gosaMailAlternateAddress=$regex))";
} else {
$filter= "";
}
- if ($mailfilter['muser'] != ""){
- $user= $mailfilter['muser'];
+ if ($gmailfilter['muser'] != ""){
+ $user= $gmailfilter['muser'];
$filter= "$filter(|(uid=$user)(cn=$user)(givenName=$user)(sn=$user))";
}
$filter= "$filter(|(uid=$user)(cn=$user)(givenName=$user)(sn=$user))";
}
}
$acl= array($this->config->current['BASE'] => ":all");
}
$acl= array($this->config->current['BASE'] => ":all");
- $res= get_list($acl, "(&(objectClass=gosaMailAccount)$filter)", TRUE, $mailfilter['depselect'], array("sn", "mail", "givenName"), TRUE);
- $ldap->cd($mailfilter['depselect']);
+ $res= get_list($acl, "(&(objectClass=gosaMailAccount)$filter)", TRUE, $gmailfilter['depselect'], array("sn", "mail", "givenName"), TRUE);
+ $ldap->cd($gmailfilter['depselect']);
$ldap->search ("(&(objectClass=gosaMailAccount)$filter)", array("sn", "mail", "givenName"));
error_reporting (0);
while ($attrs= $ldap->fetch()){
$ldap->search ("(&(objectClass=gosaMailAccount)$filter)", array("sn", "mail", "givenName"));
error_reporting (0);
while ($attrs= $ldap->fetch()){
/* Show dialog */
$smarty->assign("search_image", get_template_path('images/search.png'));
/* Show dialog */
$smarty->assign("search_image", get_template_path('images/search.png'));
+ $smarty->assign("usearch_image", get_template_path('images/search_user.png'));
$smarty->assign("tree_image", get_template_path('images/tree.png'));
$smarty->assign("infoimage", get_template_path('images/info.png'));
$smarty->assign("launchimage", get_template_path('images/small_filter.png'));
$smarty->assign("tree_image", get_template_path('images/tree.png'));
$smarty->assign("infoimage", get_template_path('images/info.png'));
$smarty->assign("launchimage", get_template_path('images/small_filter.png'));
$smarty->assign("alphabet", generate_alphabet());
$smarty->assign("hint", print_sizelimit_warning());
foreach( array("depselect", "muser", "regex") as $type){
$smarty->assign("alphabet", generate_alphabet());
$smarty->assign("hint", print_sizelimit_warning());
foreach( array("depselect", "muser", "regex") as $type){
- $smarty->assign("$type", $mailfilter[$type]);
+ $smarty->assign("$type", $gmailfilter[$type]);
}
$smarty->assign("hint", print_sizelimit_warning());
$display.= $smarty->fetch (get_template_path('mail_locals.tpl', TRUE));
}
$smarty->assign("hint", print_sizelimit_warning());
$display.= $smarty->fetch (get_template_path('mail_locals.tpl', TRUE));
if (isset($this->imapacl['anyone'])){
$smarty->assign("default_permissions", $this->imapacl['anyone']);
}
if (isset($this->imapacl['anyone'])){
$smarty->assign("default_permissions", $this->imapacl['anyone']);
}
+ $smarty->assign("member_permissions", "lrsp");
if (isset($this->imapacl['%members%'])){
$smarty->assign("member_permissions", $this->imapacl['%members%']);
}
/* Assemble extra attributes */
if (isset($this->imapacl['%members%'])){
$smarty->assign("member_permissions", $this->imapacl['%members%']);
}
/* Assemble extra attributes */
- $acl= chkacl($this->acl, "permissions");
+ $perm= chkacl($this->acl, "permissions");
$tmp= "";
$nr= 0;
$count= count($this->imapacl);
$tmp= "";
$nr= 0;
$count= count($this->imapacl);
foreach($this->imapacl as $user => $acl){
if ($user != "anyone" && $user != "%members%"){
$tmp.= "<tr><td><input name=\"user_$nr\" size=20 maxlength=60 ".
foreach($this->imapacl as $user => $acl){
if ($user != "anyone" && $user != "%members%"){
$tmp.= "<tr><td><input name=\"user_$nr\" size=20 maxlength=60 ".
- "value=\"$user\" $acl></td><td><select size=\"1\" name=\"perm_$nr\" $acl>";
+ "value=\"$user\" $perm></td><td><select size=\"1\" name=\"perm_$nr\" $perm>";
foreach ($this->perms as $key => $value){
if ($acl == $key){
$tmp.= "<option value=$key selected>$value</option>";
foreach ($this->perms as $key => $value){
if ($acl == $key){
$tmp.= "<option value=$key selected>$value</option>";
$tmp.= "</select> ";
if ($nr == $count - 1){
$tmp.= "<input type=submit value=\""._("Add")."\" ".
$tmp.= "</select> ";
if ($nr == $count - 1){
$tmp.= "<input type=submit value=\""._("Add")."\" ".
- "name=\"add_$nr\" $acl>";
+ "name=\"add_$nr\" $perm>";
}
if ($count > 3){
$tmp.= "<input type=submit value=\""._("Remove")."\" ".
}
if ($count > 3){
$tmp.= "<input type=submit value=\""._("Remove")."\" ".
- "name=\"del_$nr\" $acl></td></tr>";
+ "name=\"del_$nr\" $perm></td></tr>";
}
}
$this->indexed_user[$nr]= $user;
}
}
$this->indexed_user[$nr]= $user;
$smarty->assign("$val"."ACL", chkacl($this->acl, "$val"));
}
if (is_numeric($this->gosaMailQuota) && $this->gosaMailQuota != 0){
$smarty->assign("$val"."ACL", chkacl($this->acl, "$val"));
}
if (is_numeric($this->gosaMailQuota) && $this->gosaMailQuota != 0){
- $smarty->assign("quotausage", $this->quotaUsage * 100 / $this->gosaMailQuota);
+ $smarty->assign("quotausage", progressbar(round(($this->quotaUsage * 100)/ $this->gosaMailQuota),100,15,true));
$smarty->assign("quotadefined", "true");
} else {
$smarty->assign("quotadefined", "false");
$smarty->assign("quotadefined", "true");
} else {
$smarty->assign("quotadefined", "false");
/* remove object from parent */
function remove_from_parent()
{
/* remove object from parent */
function remove_from_parent()
{
+ /* Added these ObjectClass and Attributes, because they were not
+ removed correctly, only in case of kolab ...
+ */
+ if(isset($this->config->current['MAILMETHOD'])&&preg_match("/kolab/i",$this->config->current['MAILMETHOD'])){
+ $this->attributes[]="acl";
+ $this->attributes[]="kolabHomeServer";
+ $this->objectclasses[] = "kolabSharedFolder";
+ }
/* include global link_info */
$ldap= $this->config->get_ldap_link();
/* include global link_info */
$ldap= $this->config->get_ldap_link();
/* Keep uid */
unset ($this->attrs['uid']);
$ldap->cd($this->dn);
/* Keep uid */
unset ($this->attrs['uid']);
$ldap->cd($this->dn);
- $ldap->modify($this->attrs);
+ $this->cleanup();
+$ldap->modify ($this->attrs);
+
show_ldap_error($ldap->get_error());
/* Connect to IMAP server for account deletion */
show_ldap_error($ldap->get_error());
/* Connect to IMAP server for account deletion */
$method->deleteMailbox($this->uid);
$method->disconnect();
}
$method->deleteMailbox($this->uid);
$method->disconnect();
}
+ $method->fixAttributesOnRemove($this);
}
/* Optionally execute a command after we're done */
}
/* Optionally execute a command after we're done */
if (!isset($_POST["user_$nr"])){
continue;
}
if (!isset($_POST["user_$nr"])){
continue;
}
- if ($_POST["user_$nr"] != $user ||
+ if ($_POST["user_$nr"] != $user ||
$_POST["perm_$nr"] != $this->indexed_acl[$nr]){
$this->is_modified= TRUE;
}
$_POST["perm_$nr"] != $this->indexed_acl[$nr]){
$this->is_modified= TRUE;
}
}
}
- /* Save data to LDAP, depending on is_account we save or delete */
+ /*
+ Backup for function save
+ Änderungen : fixAttributesOnStore($this) wurde erst nach dem this->cleanup();
+$ldap->modify
+
+ Ausgeführt, deshalb wurden die gemappten Attribute auch nicht
+ gespeichert.
+
+ Von : Fabian Hickert
+ Datum : 15.12.2005
+
+ Alter Quellcode :
+
+ /* Save data to LDAP, depending on is_account we save or delete * /
function save()
{
$ldap= $this->config->get_ldap_link();
function save()
{
$ldap= $this->config->get_ldap_link();
- /* Call parents save to prepare $this->attrs */
+ /* Call parents save to prepare $this->attrs * /
plugin::save();
plugin::save();
- /* Save arrays */
+ /* Save arrays * /
$this->attrs['gosaMailAlternateAddress']= $this->gosaMailAlternateAddress;
$this->attrs['gosaMailForwardingAddress']= $this->gosaMailForwardingAddress;
$this->attrs['gosaMailAlternateAddress']= $this->gosaMailAlternateAddress;
$this->attrs['gosaMailForwardingAddress']= $this->gosaMailForwardingAddress;
- /* Save shared folder target */
+ /* Save shared folder target * /
$this->attrs['gosaSharedFolderTarget']= "share+".$this->uid;
$this->attrs['gosaSharedFolderTarget']= "share+".$this->uid;
- /* Save acl's */
+ /* Save acl's * /
$this->attrs['acl']= array();
foreach ($this->imapacl as $user => $acl){
if ($user == ""){
$this->attrs['acl']= array();
foreach ($this->imapacl as $user => $acl){
if ($user == ""){
$this->attrs['acl'][]= "$user $acl";
}
$this->attrs['acl'][]= "$user $acl";
}
- /* Save data to LDAP */
+ /* Save data to LDAP * /
$ldap->cd($this->dn);
$ldap->cd($this->dn);
- $ldap->modify($this->attrs);
+ $this->cleanup();
+$ldap->modify ($this->attrs);
+
show_ldap_error($ldap->get_error());
show_ldap_error($ldap->get_error());
- /* Only do IMAP actions if we are not a template */
+ /* Only do IMAP actions if we are not a template * /
if (!$this->is_template){
$method= new $this->method($this->config);
if (!$this->is_template){
$method= new $this->method($this->config);
+ $method->fixAttributesOnStore($this);
+ if ($method->connect($this->gosaMailServer)){
+ $method->updateMailbox($this->uid);
+ $method->setQuota($this->uid, $this->gosaMailQuota);
+
+ /* Exchange '%member%' pseudo entry * /
+ $memberacl= $this->imapacl['%members%'];
+ unset ($this->imapacl['%members%']);
+ foreach ($this->members as $user){
+ if (!isset($this->imapacl[$user])){
+ $this->imapacl[$user]= $memberacl;
+ }
+ }
+
+ $method->setSharedFolderPermissions($this->uid, $this->imapacl);
+ $method->disconnect();
+ }
+ }
+
+ /* Optionally execute a command after we're done * /
+ if ($this->initially_was_account == $this->is_account){
+ if ($this->is_modified){
+ $this->handle_post_events("mofify");
+ }
+ } else {
+ $this->handle_post_events("add");
+ }
+ }
+
+ ENDE Alter Quellcode
+ */
+
+
+
+
+
+
+
+
+ /* Save data to LDAP, depending on is_account we save or delete */
+ function save()
+ {
+ $ldap= $this->config->get_ldap_link();
+
+ /* Call parents save to prepare $this->attrs */
+ plugin::save();
+
+ /* Save arrays */
+ $this->attrs['gosaMailAlternateAddress']= $this->gosaMailAlternateAddress;
+ $this->attrs['gosaMailForwardingAddress']= $this->gosaMailForwardingAddress;
+
+ /* Save shared folder target */
+ $this->attrs['gosaSharedFolderTarget']= "share+".$this->uid;
+
+ if(preg_match("/kolab/i",$this->mmethod)){
+ /* Save acl's */
+ $this->attrs['acl']= array();
+ foreach ($this->imapacl as $user => $acl){
+ if ($user == ""){
+ continue;
+ }
+ $ldap->search("(&(objectClass=person)(uid=".$user."))",array("mail"));
+ $mail = $ldap->fetch();
+ if($mail){
+ if(isset($mail['mail'][0])){
+ $this->attrs['acl'][]= $mail['mail'][0]." $acl";
+ }
+ }else{
+ $this->attrs['acl'][]= "$user $acl";
+ }
+ }
+ }else{
+ /* Save acl's */
+ $this->attrs['acl']= array();
+ foreach ($this->imapacl as $user => $acl){
+ if ($user == ""){
+ continue;
+ }
+ $this->attrs['acl'][]= "$user $acl";
+ }
+ }
+
+ /* Only do IMAP actions if we are not a template */
+ if(preg_match("/kolab/i",$this->mmethod)){
+ if (empty($this->gosaMailServer)||is_array($this->gosaMailServer)){
+ if(isset($this->attrs['gosaMailServer'][0])){
+ $this->gosaMailServer = $this->attrs['gosaMailServer'][0];
+ }
+ }
+ }
+
+ if ((!$this->is_template)&&(!empty($this->gosaMailServer))){
+ $method= new $this->method($this->config);
+ $method->fixAttributesOnStore($this);
if ($method->connect($this->gosaMailServer)){
$method->updateMailbox($this->uid);
$method->setQuota($this->uid, $this->gosaMailQuota);
if ($method->connect($this->gosaMailServer)){
$method->updateMailbox($this->uid);
$method->setQuota($this->uid, $this->gosaMailQuota);
$this->imapacl[$user]= $memberacl;
}
}
$this->imapacl[$user]= $memberacl;
}
}
-
+
$method->setSharedFolderPermissions($this->uid, $this->imapacl);
$method->disconnect();
}
}
$method->setSharedFolderPermissions($this->uid, $this->imapacl);
$method->disconnect();
}
}
+ /* Save data to LDAP */
+ $ldap->cd($this->dn);
+ $this->cleanup();
+$ldap->modify ($this->attrs);
+
+ show_ldap_error($ldap->get_error());
+
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
if ($this->is_modified){
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
if ($this->is_modified){
$message[]= _("Please enter a valid email addres in 'Primary address' field.");
}
$ldap->cd($this->config->current['BASE']);
$message[]= _("Please enter a valid email addres in 'Primary address' field.");
}
$ldap->cd($this->config->current['BASE']);
- $ldap->search ("(&(|(mail=".$this->mail.")(gosaMailAlternateAddress=".
+ $ldap->search ("(&(!(objectClass=gosaUserTemplate))(objectClass=gosaMailAccount)(|(mail=".$this->mail.")(gosaMailAlternateAddress=".
$this->mail."))(!(uid=".$this->cn."))(!(cn=".$this->cn.")))");
if ($ldap->count() != 0){
$message[]= _("The primary address you've entered is already in use.");
$this->mail."))(!(uid=".$this->cn."))(!(cn=".$this->cn.")))");
if ($ldap->count() != 0){
$message[]= _("The primary address you've entered is already in use.");
$message[]= _("You need to set the maximum mail size in order to reject anything.");
}
$message[]= _("You need to set the maximum mail size in order to reject anything.");
}
+ if(ord($this->imapacl['anyone'][0])==194){
+ $message[] = _("Please choose valid permission settings. Default permission can't be emtpy.");
+ }
+
+ if(empty($this->gosaMailServer)){
+ $message[] = _("Please select a valid mail server.");
+ }
+
return ($message);
}
return ($message);
}