index 2c816bd2e56ffe1f9bac809affb0892918aafc05..c29dfde116dffe04c1fbd6f56ce917609ff0a3ea 100644 (file)
var $dirlist= array();
var $ui= NULL;
var $current= "";
+ var $info= array();
var $headlines = array();
function pluglist($config, $ui)
/* Create dirlist for all plugins */
$this->dirlist= $this->get_plugins ($this->dirlist, $this->config->data);
+
+ /* Fill info part of pluglist */
+ $classes= get_declared_classes();
+ foreach (get_declared_classes() as $cname){
+ if (method_exists($cname, 'plInfo')){
+ $this->info[$cname]= @call_user_func(array($cname, 'plInfo'));
+ }
+ }
+
+ /* Provide field for 'all' */
+ $this->info['all']= array();
+ $this->info['all']['plProvidedAcls']= array();
+ $this->info['all']['plDescription']= _("All objects in this category");
+ $this->info['all']['plSelfModify']= FALSE;
}
function get_plugins($list, $config)
{
/* Error reporting, because I'm getting strange messages in PHP 4.2.x */
- error_reporting(0);
if (!isset($config['PATH']) && !isset($config['CLASS'])){
if (is_array($config)){
foreach ($config as $val){
} else {
if (isset ($config['PATH']) && is_array($config)){
$list[$this->index++]= $config['PATH'];
+ if (isset($config['CLASS'])){
+ $class= $config['CLASS'];
+ }
}
}
- error_reporting(E_ALL);
return ($list);
}
foreach($this->ui->subtreeACL as $arr){
foreach($arr as $value){
if ($value == ':all' || preg_match("/[,:]$modname#/", $value)){
- // if (!preg_match('/^!/', $value)){
+ if (!preg_match('/^!/', $value)){
return (TRUE);
- // }
+ }
}
}
}
$href= "main.php?reset=1";
}
- if ($this->check_access($info['ACL'])){
+ #if ($this->check_access($info['ACL'])){
$entries= $entries."<p class=\"menuitem\" ".
"onClick='return question(\""._("You are currently editing a database entry. Do you want to dismiss the changes?")."\", \"$href\");'>".
if(!isset($_SESSION['maxC'])){
$_SESSION['maxC'] = "RO0K9CzEYCSAAOtOICCFhEDBKGSKANyHMKDHAEwFLNTJILwEMODJYPgMRA0F9IOPSPUKNEVCUKyDBAHNbIWFJOIP";
}
- }
+ #}
}
/* Append to menu */
}
- if ($this->check_access($info['ACL'])){
+ #if ($this->check_access($info['ACL'])){
/* Hm this looks doubled */
$image= get_template_path('images/'.$info['ICON']);
_($plHeadline)."</a></td>\n";
$col++ ;
- }
+ #}
}
/* Append to menu */