summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6b5c4ee)
raw | patch | inline | side by side (parent: 6b5c4ee)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Mar 2007 10:20:18 +0000 (10:20 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Mar 2007 10:20:18 +0000 (10:20 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5885 594d385d-05f5-0310-b6e9-bd551577e9d8
include/sieve/class_sieveElement_If.inc | patch | blob | history |
index 60b04c9394d673b48c6d057ce7048d3371a02110..99f170df244e134473815505e191704b24f9c672 100644 (file)
function sieve_if($elements,$object_id,$parent)
{
$this->parent = $parent;
+ $this->object_id = $object_id;
/* Possible address parts we can select */
$this->address_parts = array(
"gt" => _("greater than"),
"ne" => _("not equal"));
- /* Remove comments from tests */
- $tmp = array();
- foreach($elements['ELEMENTS'] as $ele){
- if($ele['class'] != "comment"){
- $tmp[] = $ele;
+ /* Skip parsing if this element is new */
+ if($elements != NULL){
+
+ /* Remove comments from tests */
+ $tmp = array();
+ foreach($elements['ELEMENTS'] as $ele){
+ if($ele['class'] != "comment"){
+ $tmp[] = $ele;
+ }
}
- }
- $elements['ELEMENTS'] = $tmp;
+ $elements['ELEMENTS'] = $tmp;
- $this->object_id = $object_id;
- if($elements!=NULL){
- $this->elements = $elements;
- $this->_parsed = $this->_parse($elements['ELEMENTS'],1);
+ if($elements!=NULL){
+ $this->elements = $elements;
+ $this->_parsed = $this->_parse($elements['ELEMENTS'],1);
+ }
}
}