summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6314ddd)
raw | patch | inline | side by side (parent: 6314ddd)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 9 Jun 2008 11:21:40 +0000 (11:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 9 Jun 2008 11:21:40 +0000 (11:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11265 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/mail/admin/systems/services/imap/class_goImapServer.inc | patch | blob | history | |
gosa-plugins/mail/admin/systems/services/imap/goImapServer.tpl | patch | blob | history |
diff --git a/gosa-plugins/mail/admin/systems/services/imap/class_goImapServer.inc b/gosa-plugins/mail/admin/systems/services/imap/class_goImapServer.inc
index b2b5ea9aa8ebce82becc2e5870d966316c470124..552fccff402dab74f6fe48d63e088151744bac01 100644 (file)
var $dn = NULL;
var $StatusFlag = "goImapServerStatus";
var $attributes = array("goImapName","goImapConnect","goImapAdmin","goImapPassword",
- "goImapSieveServer","goImapSievePort",
+ "goImapSieveServer",
"cyrusImap","cyrusImapSSL","cyrusPop3","cyrusPop3SSL");
var $cn = "";
var $goImapSieveServer = "";
var $goImapSievePort = "";
-
var $goImapServerStatus = "";
var $cyrusImap = false;
$this->view_logged = TRUE;
new log("view","server/".get_class($this),$this->dn);
}
-
+
/* set new status */
if(isset($_POST['ExecAction'])){
if(isset($this->Actions[$_POST['action']])){
foreach($tmp['plProvidedAcls'] as $name => $translation){
$smarty->assign($name."ACL",$this->getacl($name));
}
+
$smarty->assign("Actions",$this->Actions);
$smarty->assign("is_new",$this->dn);
$smarty->assign("is_acc",$this->initially_was_account);
}
if(empty($this->goImapConnect)){
$message[] = msgPool::required(_("Connect URL"));
- }
+ }elseif(!preg_match('/^\{[^:]+:[0-9]+.*\}$/', $this->goImapConnect)){
+ $message[]= msgPool::invalid(_("Connect URL"),"","","{server-name:port/options}");
+ }
+
+ if(empty($this->goImapSieveServer)){
+ $message[] = msgPool::required(_("Sieve connect URL"));
+ }elseif(!preg_match('/^\{[^:]+:[0-9]+.*\}$/', $this->goImapSieveServer)){
+ $message[]= msgPool::invalid(_("Sieve connect URL"),"","","{server-name:port/options}"." ".
+ sprintf(_("Valid options are: %s"),"tls,notls"));
+ }
+
if(empty($this->goImapAdmin)){
$message[] = msgPool::required(_("Admin user"));
}
$message[] = msgPool::required(_("Password"));
}
- /* Check connect string */
- if (!preg_match('/^\{[^:]+:[0-9]+.*\}$/', $this->goImapConnect)){
- $message[]= msgPool::invalid(_("Connect URL"),"","{server-name:port/options}");
- }
- if (!preg_match('/^[0-9]+$/', $this->goImapSievePort)){
- $message[]= msgPool::invalid(_("Sieve port"),$this->goImapSievePort,"/[0-9]/");
- }
+# if(empty($this->goImapSievePort)){
+# $message[] = msgPool::required(_("Sieve port"));
+# }elseif (!preg_match('/^[0-9]+$/', $this->goImapSievePort)){
+# $message[]= msgPool::invalid(_("Sieve port"),$this->goImapSievePort,"/[0-9]/");
+# }
return ($message);
}
/* Save service */
function save()
{
- /* Move cn to sieve server */
- $this->goImapSieveServer= $this->cn;
-
+
plugin::save();
+
+ $this->attrs['goImapSievePort'] = preg_replace("/^\{[^:]+:([0-9]*)\/.*$/","\\1",$this->goImapSieveServer);
+
/* Check if this is a new entry ... add/modify */
$ldap = $this->config->get_ldap_link();
$ldap->cat($this->dn,array("objectClass"));
"goImapConnect" =>_("Connect URL"),
"goImapAdmin" =>_("Admin user"),
"goImapPassword" =>_("Admin password"),
- "goImapSievePort" =>_("Sieve port"),
+// "goImapSievePort" =>_("Sieve port"),
+ "goImapSieveServer"=>_("Sieve connect URL"),
"cyrusImap" =>_("Start IMAP service"),
"cyrusImapSSL" =>_("Start IMAP SSL service"),
"cyrusPop3" =>_("Start POP3 service"),
diff --git a/gosa-plugins/mail/admin/systems/services/imap/goImapServer.tpl b/gosa-plugins/mail/admin/systems/services/imap/goImapServer.tpl
index e2078d7409d635a8e3567ded52070004e41d3492..e0f0b849fd668804e954032ac60c7825d60c5878 100644 (file)
</td>
</tr>
<tr>
- <td>{t}Sieve port{/t}{$must}
+ <td>{t}Sieve connect URL{/t}{$must}
</td>
<td>
-{render acl=$goImapSievePortACL}
- <input name="goImapSievePort" id="goImapSievePort" size=10 maxlength=30 value="{$goImapSievePort}">
+{render acl=$goImapSieveServerACL}
+ <input name="goImapSieveServer" id="goImapSieveServer" size=30 maxlength=60 value="{$goImapSieveServer}">
{/render}
</td>
</tr>