summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 97f5b92)
raw | patch | inline | side by side (parent: 97f5b92)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 5 Apr 2007 07:01:21 +0000 (07:01 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 5 Apr 2007 07:01:21 +0000 (07:01 +0000) |
Will save sieve script when user is saved.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5988 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5988 594d385d-05f5-0310-b6e9-bd551577e9d8
include/sieve/class_sieveManagement.inc | patch | blob | history | |
include/sieve/templates/management.tpl | patch | blob | history | |
plugins/personal/mail/class_mailAccount.inc | patch | blob | history |
index 04a1f9081e4d5203957d977008c46e361b09cee9..e382838dfd040c477700514710a437295bf9601e 100644 (file)
sprintf(
_("Can't log into SIEVE server. Server says '%s'."),
to_string($this->Sieve_Error)));
+ return;
}
$everything_went_fine = TRUE;
index f49a8ee4e4e3db0ea09744e738a4ef646c310988..43aebef3be4ccb003838a67807c7250cd1f52756 100644 (file)
<br>
<br>
- {$List}
-
- <p style="text-align:right">
- <input type=submit name="sieve_cancel" value="{t}Cancel{/t}">
- </p>
{elseif $Sieve_Error != ""}
<font color='red'><b>{t}Connection to sieve could not be established.{/t}</b></font><br>
{t}Possibly the sieve account was not created yet.{/t}
<br>
<br>
-
- {$List}
-
- <p style="text-align:right">
- <input type=submit name="sieve_cancel" value="{t}Cancel{/t}">
- </p>
-
-{else}
+{/if}
{t}Be careful. All your changes will be saved directly to sieve, if you use the save button below.{/t}
<br>
<input type='submit' name='create_new_script' value='{t}Create new script{/t}'>
<input type=submit name="sieve_cancel" value="{t}Cancel{/t}">
</p>
-{/if}
diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc
index e6c11cf383e6b9c6eac360fa4d5c73fb7481dfaa..77e85bd1e6f6f449f4dca2d99104ed656b938896 100644 (file)
var $objectclasses= array("gosaMailAccount");
var $uid;
+ var $sieve_management = NULL;
+
/* constructor, if 'dn' is set, the node loads the given
'dn' from LDAP */
function mailAccount ($config, $dn= NULL)
}
}
-
- /* Create filter */
+ /* Create sieve management class */
+ $method = new $this->method($this->config);
+ $id = $method->uattrib;
+ $this->sieve_management = new sieveManagement($this->config,$this->dn,$this,$id);
/* Get global filter config */
if (!is_global("mailfilter")){
&& preg_match("/C/",$this->gosaMailDeliveryMode)
&& $this->acl_is_writeable("sieveManagement")) {
- $method = new $this->method($this->config);
- $id = $method->uattrib;
-
- $this->dialog = new sieveManagement($this->config,$this->dn,$this,$id);
+ $this->dialog = $this->sieve_management;
}
/* Cancel sieve edit */
/* Save sieve changes */
if(isset($_POST['sieve_finish'])){
- if($this->dialog->save()){
- $this->dialog = NULL;
- }
+ $this->sieve_management = $this->dialog;
+ $this->dialog = NULL;
}
if(is_object($this->dialog)){
$method->disconnect();
/* Ensure that this is an existing account */
- if($this->initially_was_account){
+ if(1==1 || $this->initially_was_account){
/* Write sieve information only if not in C mode */
if (!is_integer(strpos($this->gosaMailDeliveryMode, "C"))){
$this->gosaSpamMailbox,
$this->gosaSpamSortLevel,
$this->gosaVacationMessage);
+ }else{
+ $this->sieve_management->save();
}
}
}