Setup shortcuts for packages. Fixes #9770

(cherry picked from commit 37213abe96e83884b4a8ffbbbb7cc759cd2799ec)
This commit is contained in:
jim-p 2019-09-18 16:23:12 -04:00
parent bf03bee205
commit f14ab2c616
3 changed files with 12 additions and 0 deletions

View File

@ -638,6 +638,11 @@ if (are_notices_pending()) {
<?php endif?>
<?php
/* Determine shortcut section for XML-based packages */
if (empty($shortcut_section) && !empty($xmlfile)) {
$shortcut_section = basename($pagename, '.xml');
}
if (!$hide_service_status && !empty($shortcuts[$shortcut_section]['service']) && isAllowedPage('status_services.php')) {
$ssvc = array();
switch ($shortcut_section) {

View File

@ -220,6 +220,10 @@ if ($pkg['tabs'] != "") {
ksort($tab_array);
}
if (!empty($pkg['tabs'])) {
$shortcut_section = $pkg['shortcut_section'];
}
include("head.inc");
if (isset($tab_array)) {
foreach ($tab_array as $tabid => $tab) {

View File

@ -588,6 +588,9 @@ if ($pkg['tabs'] != "") {
ksort($tab_array);
}
if (!empty($pkg['tabs'])) {
$shortcut_section = $pkg['shortcut_section'];
}
include("head.inc");
if ($pkg['custom_php_after_head_command']) {