Code

Fixed some errors
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Sep 2007 06:15:56 +0000 (06:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Sep 2007 06:15:56 +0000 (06:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7340 594d385d-05f5-0310-b6e9-bd551577e9d8

include/functions.inc
plugins/admin/groups/class_groupApplication.inc
plugins/admin/groups/class_groupMail.inc
plugins/admin/groups/remove.tpl

index c27314d87da3b01cd51b7709f5aaeef3b2aa75e0..b774cb57c677bbd36466a61bc8297fae47037dad 100644 (file)
@@ -2479,6 +2479,21 @@ function is_in_network($network, $netmask, $address)
   return ($first < $curr&& $last > $curr);
 }
 
+/* Return class name in correct case 
+ *  mailMethodkolab =>  mailMethodKolab  ( k => K )
+ */
+function get_correct_class_name($cls)
+{
+  global $class_mapping;
+  if(isset($class_mapping) && is_array($class_mapping)){
+    foreach($class_mapping as $class => $file){
+      if(preg_match("/^".$cls."$/i",$class)){
+        return($class);
+      }
+    }
+  }
+  return(FALSE);
+}
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
index 9ee859b2c4b8704c5a39b29b01ce0f0ac781e981..5d9ab683a6815ec072cf45a82a20c64b7d976fb9 100644 (file)
@@ -65,9 +65,11 @@ class appgroup extends plugin
   
       /* Release management is activated && this is a valid group app account,
           but no release class was found, so activate is_account flag  */
-      if($dn != "new" && ( in_array("gosaApplicationGroup",$this->attrs['objectClass'])) && 
-         (!in_array("FAIreleaseTag",$this->attrs['objectClass']))){
-        $this->is_account =true;
+      if(isset($this->attrs['objectClass'])){
+        if($dn != "new" && ( in_array("gosaApplicationGroup",$this->attrs['objectClass'])) && 
+            (!in_array("FAIreleaseTag",$this->attrs['objectClass']))){
+          $this->is_account =true;
+        }
       }
     }
     
index 43f449c18eaa3d5a0cfc3900730ed7a736aef179..f62805de9272d145f0842232c9fc1890dbe587aa 100644 (file)
@@ -74,8 +74,9 @@ class mailgroup extends plugin
 
     /* Check if selected mail method exists 
      */
-    if (class_exists("mailMethod$this->mmethod")){
-      $this->method= "mailMethod$this->mmethod";
+    $cls = get_correct_class_name("mailMethod$this->mmethod");
+    if ($cls && class_exists($cls)){
+      $this->method= $cls;
     } else {
       print_red(sprintf(_("There is no mail method '%s' specified in your gosa.conf available."), $this->mmethod));
     }
index c91b28f7f564072b87626241cb4648584a7270e5..1c938342c53514b1d7f74755e072c0ec84d6d232 100644 (file)
@@ -13,7 +13,7 @@
 <p class="plugbottom">
 
   {if $multiple}
-  <input type=submit name="delete_multiple_group_confirm" value="{t}Delete{/t}">
+  <input type=submit name="delete_multiple_groups_confirm" value="{t}Delete{/t}">
   &nbsp;
   <input type=submit name="delete_multiple_group_cancel" value="{t}Cancel{/t}">
   {else}