Code

Fixed sieve management handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Nov 2008 09:16:19 +0000 (09:16 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Nov 2008 09:16:19 +0000 (09:16 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13064 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/personal/mail/sieve/class_sieveManagement.inc

index fa829e575e25d4a6cea527ee001a4b34f2bc3046..e40e03ba890cc3540559cdcff9abe033059e897d 100644 (file)
@@ -686,6 +686,8 @@ class sieveManagement extends plugin
    */
   function add_new_element_to_current_script($type,$id,$position)
   {
+    print_a(array($type,$id,$position));
+
     /* Test given data */
     if(!in_array_ics($position,array("above","below"))){
       trigger_error("Can't add new element with \$position=".$position.". Only 'above','below' are allowed here.");
@@ -695,8 +697,7 @@ class sieveManagement extends plugin
       trigger_error("Can't add new element, given id is not numeric.");
       return(FALSE);
     }
-    $tmp = get_declared_classes();  
-    if(!in_array($type,$tmp)){
+    if(!class_available($type)){
       if(!empty($type)){
         trigger_error("Can't add new element, given \$class=".$class." does not exists.");
       }