Code

Added empty value, to elements that could be added
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 5 Apr 2007 13:21:07 +0000 (13:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 5 Apr 2007 13:21:07 +0000 (13:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5994 594d385d-05f5-0310-b6e9-bd551577e9d8

include/sieve/class_sieveManagement.inc
include/sieve/templates/object_container.tpl

index dfc76229aacefc9d06993d9e0f61a87b2fb99655..96035b5b2079e9307d576b223beec3fb4113b5dd 100644 (file)
@@ -699,7 +699,9 @@ class sieveManagement extends plugin
     }
     $tmp = get_declared_classes();  
     if(!in_array($type,$tmp)){
-      trigger_error("Can't add new element, given \$class=".$class." does not exists.");
+      if(!empty($type)){
+        trigger_error("Can't add new element, given \$class=".$class." does not exists.");
+      }
       return(FALSE);
     }
     if(!is_object($this->current_handler) || get_class($this->current_handler) != "My_Parser"){
index 49027a5b6d088fda774d3af38dab884b0ed24cf8..967338323ff9a55ece3fae5a05f5f214b8897b15 100644 (file)
@@ -18,6 +18,7 @@
 
        
                        <select name='element_type_{$ID}'>
+                               <option value=''>&nbsp;</option>
                                <option value='sieve_comment'>comment</option>
                                <option value='sieve_fileinto'>sieve_fileinto</option>
                                <option value='sieve_keep'>sieve_keep</option>