Commit 0fe4a0f0 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Ease use of menu providers

Showing with 23 additions and 11 deletions
+23 -11
......@@ -41,14 +41,20 @@ header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Cache-Control: post-check=0, pre-check=0");
$bintype = session::is_set('binarytype')
? session::get('binarytype') : "octet-stream";
$key = 'binary';
if (isset ($_GET['key'])) {
$key .= $_GET['key'];
}
$bintype = session::is_set($key.'type')
? session::get($key.'type') : "octet-stream";
header("Content-type: " . $bintype);
if (session::is_set('binaryfile')) {
if (session::is_set($key.'file')) {
header( "Content-disposition: attachment; filename="
. session::get('binaryfile'));
. session::get($key.'file'));
}
echo session::get('binary');
echo session::get($key);
error_reporting (E_ALL | E_STRICT);
?>
......@@ -307,15 +307,18 @@ class pluglist {
/* Parse sub-plugins */
foreach ($this->config->data['MENU'][$section] as $info) {
if (!$this->check_access($info['ACL'])) {
continue;
}
if (isset($info['CLASS']) && plugin_available($info['CLASS'])) {
if (!$this->check_access($info['ACL'])) {
continue;
}
$index = $this->get_index($info['CLASS']);
$this->allowed_plugins[$index] = $index;
list ($plHeadline, $plDescription, $href, ) = $this->get_infos($info['CLASS']);
$id = $info['CLASS'];
} elseif (!isset($info['CLASS'])) {
if (isset($info['ACL']) && !$this->check_access($info['ACL'])) {
continue;
}
$plHeadline = $info['TITLE'];
$plDescription = $info['DESCRIPTION'];
$href = $info['LINK'];
......@@ -376,14 +379,17 @@ class pluglist {
$menu .= $section_infos['NAME']."</h1>\n";
foreach ($this->config->data['MENU'][$section] as $info) {
if (!$this->check_access($info['ACL'])) {
continue;
}
if (isset($info['CLASS']) && plugin_available($info['CLASS'])) {
if (!$this->check_access($info['ACL'])) {
continue;
}
/* Read information from class variable */
list ($plHeadline, $plDescription, $href, $plIcon) = $this->get_infos($info['CLASS']);
$id = $info['CLASS'];
} elseif (!isset($info['CLASS'])) {
if (isset($info['ACL']) && !$this->check_access($info['ACL'])) {
continue;
}
$plHeadline = $info['TITLE'];
$plDescription = $info['DESCRIPTION'];
$href = $info['LINK'];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment