diff --git a/plugins/admin/systems/class_goImapServer.inc b/plugins/admin/systems/class_goImapServer.inc
index a10c7150523839eb6196bf84dc950df2cc3a5719..56d658bab5cbb17314c802bb3e3c15ab9460f1ce 100644 (file)
$this->Actions = array( SERVICE_STOPPED=>SERVICE_STOPPED,
SERVICE_STARTED => SERVICE_STARTED,
- SERVICE_RESETTED=>SERVICE_RESETTED,
+ SERVICE_RESTARTED=>SERVICE_RESTARTED,
"repair_database"=>_("Repair database"));
}
}
$smarty->assign("Actions",$this->Actions);
$smarty->assign("is_new",$this->dn);
+ $smarty->assign("is_acc",$this->initially_was_account);
return($smarty->fetch(get_template_path("goImapServer.tpl",TRUE,dirname(__FILE__))));
}
$fields['Message'] = _("Cyrus service");
$fields['AllowStart'] = true;
$fields['AllowStop'] = true;
- $fields['AllowReset'] = true;
+ $fields['AllowRestart'] = true;
$fields['AllowRemove']= true;
$fields['AllowEdit'] = true;
return($fields);
function setStatus($value)
{
if($value == "none") return;
+ if(!$this->initially_was_account) return;
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->dn);
- $ldap->cat($this->dn,array("objectClass","goImapName","goImapConnect","goImapAdmin","goImapPassword"));
-
+ $ldap->cat($this->dn,array("objectClass"));
if($ldap->count()){
- $attrs =array();
- foreach(array("goImapName","goImapConnect","goImapAdmin","goImapPassword") as $required){
- if(!isset($attrs[$required])){
- if(empty($this->$required)){
- print_red(_("Can't set new status while there are blank option within generic configuration part."));
- return;
- }else{
- $attrs[$required] = $this->$required;
- }
- }else{
- $attrs[$required] = $attrs[$required][0];
- }
- }
-
$tmp = $ldap->fetch();
for($i = 0; $i < $tmp['objectClass']['count']; $i ++){
$attrs['objectClass'][] = $tmp['objectClass'][$i];
}
- if(!in_array("goImapServer",$attrs['objectClass'])){
- $attrs['objectClass'][] = "goImapServer";
- }
$flag = $this->StatusFlag;
$attrs[$flag] = $value;
$this->$flag = $value;