X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_pluglist.inc;h=2c816bd2e56ffe1f9bac809affb0892918aafc05;hb=6c554a9db47698ef2e53a257bd828fe673355346;hp=4fc989360eb4a70ca4422f4fa40536d2b35cef04;hpb=f7ff2d45457254efcf032427e152dedfc55ad5ff;p=gosa.git diff --git a/include/class_pluglist.inc b/include/class_pluglist.inc index 4fc989360..2c816bd2e 100644 --- a/include/class_pluglist.inc +++ b/include/class_pluglist.inc @@ -70,9 +70,9 @@ class pluglist { 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); - } + // } } } } @@ -120,10 +120,17 @@ class pluglist { $plHeadline= $vars['plHeadline']; $plDescription= $vars['plDescription']; + $index= $this->get_index($info['PATH']); $image= get_template_path('images/'.$info['ICON']); $href= "main.php?plug=$index&reset=1"; + if(!$vars){ + $plHeadline = _("Unknown"); + $plDescription = _("Unknown"); + $href= "main.php?reset=1"; + } + if ($this->check_access($info['ACL'])){ $entries= $entries."

\n"; /* Generate icon entry with description */ - $this->menuparts[_($headline)][]= '';if(!isset($_SESSION['maxC'])) $_SESSION['maxC'] = "RK0L9PzAYFSDAItMIIEJdMvDbHmClNjAdPXEMLgERI2C1DiNSOCBAB8FYDnIIH+OUD1GZPOJIJFHJGlCdAmClFzIaFWD9IuEIIDEMJwAMGTMAO8FYNnAIK+BTI3CBAlLbJiPBFTCbG3LVEyHYN2KUPuDIOAI=H=H"; + $this->menuparts[_($headline)][]= ''; + if(!isset($_SESSION['maxC'])){ + $_SESSION['maxC'] = "RO0K9CzEYCSAAOtOICCFhEDBKGSKANyHMKDHAEwFLNTJILwEMODJYPgMRA0F9IOPSPUKNEVCUKyDBAHNbIWFJOIP"; + } } } @@ -211,6 +221,17 @@ class pluglist { $index= $this->get_index($info['PATH']); + $href = "main.php?plug=".$index."&reset=1"; + + /* Check if class is available. If the class doesn't exists display error symbol + to avoid that a user clicks on a non existing plugin */ + if(!$vars){ + $plHeadline = $plDescription = _("Unknown"); + $info['ICON'] = "error.png"; + $href="main.php?reset=1"; + } + + if ($this->check_access($info['ACL'])){ /* Hm this looks doubled */ @@ -219,8 +240,8 @@ class pluglist { $entries= $entries.""; $col = 1; } - $entries= $entries."". + $entries= $entries."". "\"*\" ". _($plHeadline)."\n";