summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7111eb1)
raw | patch | inline | side by side (parent: 7111eb1)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 16 Mar 2007 13:26:46 +0000 (13:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 16 Mar 2007 13:26:46 +0000 (13:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5803 594d385d-05f5-0310-b6e9-bd551577e9d8
include/sieve/class_sieveManagement.inc | patch | blob | history | |
include/sieve/templates/object_container_clear.tpl | patch | blob | history |
index d25cdfa2eaa1634925890663888e1e2c1f41065f..94b8a1116a3667a421f0d85af585fe721261282f 100644 (file)
/* Try to activate the given script and update
* class script array.
*/
- if(!$this->sieve_handle->sieve_setactivescript($this->scripts[$script]['NAME'])){
- print_red(sprintf(_("Can't activate sieve script on server. Server says '%s'."),to_string($this->sieve_handle->error_raw)));
+ if(!$sieve->sieve_setactivescript($this->scripts[$script]['NAME'])){
+ print_red(sprintf(_("Can't activate sieve script on server. Server says '%s'."),to_string($sieve->error_raw)));
}else{
foreach($this->scripts as $key => $data){
if($key == $script){
}
if(!$sieve->sieve_deletescript($this->scripts[$this->script_to_delete]['NAME'])){
- print_red(sprintf(_("Can't remove sieve script from server. Server says '%s'."),to_string($this->sieve_handle->error_raw)));
+ print_red(sprintf(_("Can't remove sieve script from server. Server says '%s'."),to_string($sieve->error_raw)));
}else{
unset($this->scripts[$this->script_to_delete]);
}
}
}
- if($add_else_elsif){
+ if($add_else_elsif && $this->add_above_below == "below"){
$element_types['sieve_else'] = _("Else");
$element_types['sieve_elsif'] = _("Else if");
}
function save()
{
- /* Connect to sieve class and try to get all available sieve scripts */
- $cfg= $this->config->data['SERVERS']['IMAP'][$this->parent->gosaMailServer];
-
- $this->sieve_handle=
- new sieve( $cfg["sieve_server"],
- $cfg["sieve_port"],
- $this->parent->mail,
- $cfg["password"],
- $cfg["admin"]);
-
- if (!$this->sieve_handle->sieve_login()){
- print_red(sprintf(_("Can't log into SIEVE server. Server says '%s'."),to_string($this->sieve_handle->error_raw)));
- return;
+ /* Get sieve */
+ if(!$sieve = $this->get_sieve()){
+ print_red(
+ sprintf(
+ _("Can't log into SIEVE server. Server says '%s'."),
+ to_string($this->Sieve_Error)));
}
$everything_went_fine = TRUE;
foreach($this->scripts as $key => $script){
if($script['EDITED']){
$data = $this->scripts[$key]['SCRIPT'];
- if(!$this->sieve_handle->sieve_sendscript($script['NAME'], $data)){
- gosa_log("Failed to save sieve script named '".$script['NAME']."': ".to_string($this->sieve_handle->error_raw));
+ if(!$sieve->sieve_sendscript($script['NAME'], $data)){
+ gosa_log("Failed to save sieve script named '".$script['NAME']."': ".to_string($sieve->error_raw));
$everything_went_fine = FALSE;
- print_red(to_string($this->sieve_handle->error_raw));
+ print_red(to_string($sieve->error_raw));
$this->scripts[$key]['MSG'] = "<font color='red'>".
_("Failed to save sieve script").": ".
- to_string($this->sieve_handle->error_raw).
+ to_string($sieve->error_raw).
"</font>";
}
}
diff --git a/include/sieve/templates/object_container_clear.tpl b/include/sieve/templates/object_container_clear.tpl
index aefc8b10a10ae7489abfd707e611da300f1b3843..371683354458ef58bc9220e0e8e6a3c14edf9674 100644 (file)
<table cellspacing=0 style='width:100%;background-color:#EEEEEE;border: solid 1px #BBB;346575;'>
+ <tr>
+ <td style='background-color: #235464; text-align:center;'>
+
+ </td>
+ <td style='background-color: #235464; text-align:left; padding:2px;' >
+ <input type='image' src='images/sieve_add_new_top.png' name='Add_Object_Top_{$ID}'
+ alt='{t}Add new{/t}' title='{t}Add a new new object on top of this one.{/t}' class='center'>
+ <input type='image' src='images/sieve_add_new_bottom.png' name='Add_Object_Bottom_{$ID}'
+ alt='{t}Add new{/t}' title='{t}Add a new new object at the bottom of this one.{/t}' class='center'>
+ </td>
+ </tr>
<tr>
<td style='width:20px; background-color: #235464;'>
<input type='image' src='images/sieve_del_object.png' name='Remove_Object_{$ID}'