diff --git a/.gitignore b/.gitignore index 334dbbc502d951c1be4f79f08d6ab2b75ef842b8..e9bca2b07c446296684f3a2187d0431c101c8133 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 diff --git a/interface/web/help/lib/module.conf.php b/interface/web/help/lib/module.conf.php index 559ac3b4ffaa0f6115c71faa9730ab49134c1fa4..c135235accfafe14bd7c4cd521664ef9da616f77 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 4110c96adc91b0273201314c2b3bf14663f75eb6..c0afe10cfb332b6cb89ebac7a0c42198c6d4641b 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.'

'; ?>