From 27b42d313702174374b4e7b94592f49a2478285f Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 27 Jan 2023 13:23:48 +0100 Subject: [PATCH] #10076 add easy acces on directorys --- pandora_console/godmode/servers/plugin.php | 114 ++++++++++----------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index 82049defca..94ab20aebf 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -225,67 +225,67 @@ if ($filemanager) { $directory = (string) get_parameter('directory'); if (empty($directory) === true) { $directory = $fallback_directory; - $base_url = 'index.php?sec=gservers&sec2=godmode/servers/plugin'; - $setup_url = $base_url.'&filemanager=1&tab=Attachments'; - $tab = get_parameter('tab', null); - $tabs = [ - 'list' => [ - 'text' => ''.html_print_image( - 'images/eye_show.png', - true, - [ - 'title' => __('Plugins'), - 'class' => 'invert_filter', - ] - ).'', - 'active' => (bool) ($tab != 'Attachments'), - ], - 'options' => [ - 'text' => ''.html_print_image( - 'images/collection.png', - true, - [ - 'title' => __('Attachments'), - 'class' => 'invert_filter', - ] - ).'', - 'active' => (bool) ($tab == 'Attachments'), - ], - ]; - - if ($tab === 'Attachments') { - $helpHeader = ''; - $titleHeader = __('Index of attachment/plugin'); - } else { - $helpHeader = 'servers_ha_clusters_tab'; - $titleHeader = __('Plug-ins registered on %s', get_product_name()); - } - - // Header. - ui_print_standard_header( - $titleHeader, - 'images/gm_servers.png', - false, - $helpHeader, - false, - $tabs, - [ - [ - 'link' => '', - 'label' => __('Servers'), - ], - [ - 'link' => '', - 'label' => __('Plugins'), - ], - ] - ); } else { $directory = str_replace('\\', '/', $directory); $directory = filemanager_safe_directory($directory, $fallback_directory); - echo '

'.__('Index of %s', $directory).'

'; } + $base_url = 'index.php?sec=gservers&sec2=godmode/servers/plugin'; + $setup_url = $base_url.'&filemanager=1&tab=Attachments'; + $tab = get_parameter('tab', null); + $tabs = [ + 'list' => [ + 'text' => ''.html_print_image( + 'images/eye_show.png', + true, + [ + 'title' => __('Plugins'), + 'class' => 'invert_filter', + ] + ).'', + 'active' => (bool) ($tab != 'Attachments'), + ], + 'options' => [ + 'text' => ''.html_print_image( + 'images/collection.png', + true, + [ + 'title' => __('Attachments'), + 'class' => 'invert_filter', + ] + ).'', + 'active' => (bool) ($tab == 'Attachments'), + ], + ]; + + if ($tab === 'Attachments') { + $helpHeader = ''; + $titleHeader = __('Index of attachment/plugin'); + } else { + $helpHeader = 'servers_ha_clusters_tab'; + $titleHeader = __('Plug-ins registered on %s', get_product_name()); + } + + // Header. + ui_print_standard_header( + $titleHeader, + 'images/gm_servers.png', + false, + $helpHeader, + false, + $tabs, + [ + [ + 'link' => '', + 'label' => __('Servers'), + ], + [ + 'link' => '', + 'label' => __('Plugins'), + ], + ] + ); + $real_directory = realpath($config['homedir'].'/'.$directory); @@ -310,7 +310,7 @@ if ($filemanager) { filemanager_file_explorer( $real_directory, $directory, - 'index.php?sec=gservers&sec2=godmode/servers/plugin&filemanager=1&id_plugin='.$id_plugin, + 'index.php?sec=gservers&sec2=godmode/servers/plugin&filemanager=1&id_plugin='.$id_plugin.'&tab=Attachments', $fallback_directory, true, false,