From 7153f30b92e4fc368016106750e302cab08d1670 Mon Sep 17 00:00:00 2001 From: TommySalami Date: Mon, 26 Feb 2024 04:27:05 -0700 Subject: [PATCH 1/2] Fix message function disabling Fix issue #6653 --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 334dbbc502..e9bca2b07c 100644 --- a/.gitignore +++ b/.gitignore @@ -50,4 +50,5 @@ Temporary Items # Visual Studio code coverage results *.coverage -*.coveragexml \ No newline at end of file +*.coveragexml +/.vs -- GitLab From 9b557b423c4af9541846dbb370f2f95fdf93a4c9 Mon Sep 17 00:00:00 2001 From: TommySalami Date: Mon, 26 Feb 2024 04:39:24 -0700 Subject: [PATCH 2/2] Fix message function disabling Fix issue #6653 --- interface/web/help/lib/module.conf.php | 60 +++++++++++++------------- interface/web/help/version.php | 8 ++-- 2 files changed, 33 insertions(+), 35 deletions(-) diff --git a/interface/web/help/lib/module.conf.php b/interface/web/help/lib/module.conf.php index 559ac3b4ff..c135235acc 100644 --- a/interface/web/help/lib/module.conf.php +++ b/interface/web/help/lib/module.conf.php @@ -1,9 +1,9 @@ 'Version', + 'target' => 'content', + 'link' => 'help/version.php', + 'html_id' => 'help_version' ); + +//* Add the menu items defined above to a menu section labeled 'Support' +$module['nav'][] = array( 'title' => 'About ISPConfig', + 'open' => 1, + 'items' => $items); + +#endregion + +#region Messages menu + +//* Read the web config $app->uses('getconf'); $global_config = $app->getconf->get_global_config('misc'); if($global_config['show_support_messages'] == 'y') { - //* make sure that the items array is empty + //* Make sure that the items array is empty $items = array(); //* Add a menu item with the label 'Send message' @@ -50,7 +64,11 @@ if($global_config['show_support_messages'] == 'y') { 'items' => $items); } -//* the FAQ menu section +#endregion + +#region FAQ menu + +//* Make sure that the itemsfaq array is empty $itemsfaq = array(); //* admin's tools if($_SESSION['s']['user']['typ'] == 'admin') { @@ -81,24 +99,6 @@ else { //* the user 'items' => $itemsfaq); } } -//* -- end of the FAQ menu section - - -if($_SESSION['s']['user']['typ'] == 'admin') { - //* make sure that the items array is empty - $items = array(); - - //* Add a menu item with the label 'Version' - $items[] = array( 'title' => 'Version', - 'target' => 'content', - 'link' => 'help/version.php', - 'html_id' => 'help_version' ); - - - //* Add the menu items defined above to a menu section labeled 'Support' - $module['nav'][] = array( 'title' => 'About ISPConfig', - 'open' => 1, - 'items' => $items); -} +#endregion ?> diff --git a/interface/web/help/version.php b/interface/web/help/version.php index 4110c96adc..c0afe10cfb 100644 --- a/interface/web/help/version.php +++ b/interface/web/help/version.php @@ -28,7 +28,6 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - /****************************************** * Begin Form configuration ******************************************/ @@ -39,14 +38,13 @@ $tform_def_file = "form/user_settings.tform.php"; * End Form configuration ******************************************/ +//* Required once files require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; //* Check permissions for module $app->auth->check_module_permissions('help'); -if($_SESSION['s']['user']['typ'] == 'admin') { - echo '

 

 

'.$app->lng('ISPConfig Version:').' '.ISPC_APP_VERSION.'

'; -} - +//* Display the version +echo '

 

 

'.$app->lng('ISPConfig Version:').' '.ISPC_APP_VERSION.'

'; ?> -- GitLab