From: cajus Date: Mon, 3 Nov 2008 16:28:52 +0000 (+0000) Subject: More cleanups X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=17066e82c99575ae2cac0aef7c7982c1cb396217;p=gosa.git More cleanups git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12881 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_pluglist.inc b/gosa-core/include/class_pluglist.inc index 48233fbc0..b7c497daf 100644 --- a/gosa-core/include/class_pluglist.inc +++ b/gosa-core/include/class_pluglist.inc @@ -42,15 +42,15 @@ class pluglist { /* Create dirlist for all plugins */ $this->dirlist= $this->get_plugins ($this->dirlist, $this->config->data['MENU']); - /* Fill info part of pluglist */ - $classes= get_declared_classes(); + /* Fill info part of pluglist */ + $classes= get_declared_classes(); - foreach ($classes as $cname){ - $cmethods = get_class_methods($cname); - if (in_array_ics('plInfo',$cmethods)){ - $this->info[$cname]= call_user_func(array($cname, 'plInfo')); - } - } + foreach ($classes as $cname){ + $cmethods = get_class_methods($cname); + if (in_array_ics('plInfo',$cmethods)){ + $this->info[$cname]= call_user_func(array($cname, 'plInfo')); + } + } /* Provide field for 'all' */ $this->info['all']= array(); @@ -61,9 +61,8 @@ class pluglist { function get_plugins($list, &$config) { - global $class_mapping; + global $class_mapping; - /* Error reporting, because I'm getting strange messages in PHP 4.2.x */ if (!isset($config['CLASS'])){ if (is_array($config)){ foreach ($config as $val){ @@ -71,7 +70,7 @@ class pluglist { } } } else { - if (is_array($config) && isset($class_mapping[$config['CLASS']])){ + if (is_array($config) && isset($class_mapping[$config['CLASS']])){ $list[$this->index++]= dirname($class_mapping[$config['CLASS']]); } else { $list[$this->index++]= ""; @@ -108,8 +107,7 @@ class pluglist { $acl_to_check = trim($acl_to_check); /* Check if the given acl tag is only valid for self acl entries - ui->get_permissions($this->ui->dn,$acl_to_check,"") != ""){ @@ -120,8 +118,7 @@ class pluglist { return(FALSE); }else{ - /* No self acls. Check if we have any acls for the given ACL type - */ + /* No self acls. Check if we have any acls for the given ACL type */ $deps = $this->ui->get_module_departments($acl_to_check,TRUE); if(count($deps)){ $this->silly_cache[$aclname]= TRUE; diff --git a/gosa-core/include/class_userinfo.inc b/gosa-core/include/class_userinfo.inc index c10c6c35f..71f7ea993 100644 --- a/gosa-core/include/class_userinfo.inc +++ b/gosa-core/include/class_userinfo.inc @@ -299,7 +299,7 @@ class userinfo if (isset($ACL_CACHE["$dn+$object+$attribute"])){ $ret = $ACL_CACHE["$dn+$object+$attribute"]; if($skip_write){ - $ret = preg_replace('/w/', '',$ret); + $ret = str_replace('w', '',$ret); } return($ret); } @@ -329,7 +329,7 @@ class userinfo $ACL_CACHE["$orig_dn+$object+$attribute"] = $ACL_CACHE["$dn+$object+$attribute"]; } if($skip_write){ - $ret = preg_replace('/w/','',$ret); + $ret = str_replace('w','',$ret); } return($ret); } @@ -456,7 +456,7 @@ class userinfo /* Remove write if needed */ if ($skip_write){ - $ret= preg_replace('/w/', '', $ret); + $ret= str_replace('w', '', $ret); } return ($ret); }