From: hickert Date: Wed, 21 Mar 2007 09:31:07 +0000 (+0000) Subject: Added mssing inverse for size test X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=50aef0099909d4730e17851a114e990de11ed5d8;p=gosa.git Added mssing inverse for size test git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5848 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/sieve/class_sieveElement_If.inc b/include/sieve/class_sieveElement_If.inc index 4368a7b27..05f489514 100644 --- a/include/sieve/class_sieveElement_If.inc +++ b/include/sieve/class_sieveElement_If.inc @@ -381,7 +381,10 @@ class sieve_if } /* Add allof/anyof tag */ - $script.= " ".$key." ( "; + if($Inverse){ + $script .= "not "; + } + $script.= $key." ( "; /* Add each test parameter */ foreach($data as $key2 => $dat){ @@ -693,6 +696,11 @@ class sieve_if $Units = array( "M" => _("Megabyte") , "K" => _("Kilobyte")); + /* Toggle Inverse ? */ + if(isset($_POST['toggle_inverse_'.$element_id])){ + $parsed[$key]['Inverse'] = !$parsed[$key]['Inverse']; + } + /* Reset error */ $parsed[$key]['LastError'] =""; diff --git a/include/sieve/templates/element_size.tpl b/include/sieve/templates/element_size.tpl index fa6a92fbb..c07c02094 100644 --- a/include/sieve/templates/element_size.tpl +++ b/include/sieve/templates/element_size.tpl @@ -6,12 +6,13 @@ {$LastError}
{/if} - - {if $Inverse} - {t}If size is{/t} {t}not{/t} - {else} - {t}If size is{/t} - {/if} + + {if $Inverse} + + {else} + + {/if} +