index d4d017d1bc878e2e0bc1db2398f82ae7b445f04e..42f729db8992deab90bdb9f049bb8ab3fb9a4fc0 100644 (file)
$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."<p class=\"menuitem\" ".
$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 */
$entries= $entries."</tr><tr>";
$col = 1;
}
- $entries= $entries."<td class=\"iconmenu\" style=\"width:20%;\" onClick='location.href=\"main.php?plug=$index&reset=1\"'".
- "><a class=\"iconmenu\" href=\"main.php?plug=$index&reset=1\">".
+ $entries= $entries."<td class=\"iconmenu\" style=\"width:20%;\" onClick='location.href=\"".$href."\"'".
+ "><a class=\"iconmenu\" href=\"".$href."\">".
"<img $isize border=0 align=middle src=\"$image".
"\" alt=\"*\"> ".
_($plHeadline)."</a></td>\n";