From: hickert Date: Thu, 20 Sep 2007 06:15:56 +0000 (+0000) Subject: Fixed some errors X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0a077b4e61ad700279310b0b6f7433766c7d4b44;p=gosa.git Fixed some errors git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7340 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/functions.inc b/include/functions.inc index c27314d87..b774cb57c 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -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: ?> diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc index 9ee859b2c..5d9ab683a 100644 --- a/plugins/admin/groups/class_groupApplication.inc +++ b/plugins/admin/groups/class_groupApplication.inc @@ -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; + } } } diff --git a/plugins/admin/groups/class_groupMail.inc b/plugins/admin/groups/class_groupMail.inc index 43f449c18..f62805de9 100644 --- a/plugins/admin/groups/class_groupMail.inc +++ b/plugins/admin/groups/class_groupMail.inc @@ -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)); } diff --git a/plugins/admin/groups/remove.tpl b/plugins/admin/groups/remove.tpl index c91b28f7f..1c938342c 100644 --- a/plugins/admin/groups/remove.tpl +++ b/plugins/admin/groups/remove.tpl @@ -13,7 +13,7 @@

{if $multiple} - +   {else}