From a2a1ebda25a645d2ab30084a8be3914369dbc60c Mon Sep 17 00:00:00 2001 From: sparkyx Date: Fri, 30 Jul 2021 16:46:33 +0200 Subject: [PATCH] Task #0002050: stay in mobile menu --- html/do.php | 5 +++++ html/mobile.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/html/do.php b/html/do.php index f2775eec5..4fc7ada47 100644 --- a/html/do.php +++ b/html/do.php @@ -57,6 +57,7 @@ global $g_user, $cn,$g_parameter,$http; $g_user = new User($cn); $http=new HttpInput(); IDate::set_firstDate($g_user->get_first_week_day()); + /* * check that the database is not empty */ @@ -68,6 +69,10 @@ if ( ! $cn->exist_table('version')) { echo '

'; return; } +/** + * if access_mode is MOBILE than force it to mobile.php + */ +if ($g_user->get_access_mode()=='MOBILE') { require NOALYSS_HOME."/mobile.php"; return;} $style_user=$http->post("style_user","string",$_SESSION[SESSION_KEY.'g_theme']); diff --git a/html/mobile.php b/html/mobile.php index 7fc7ea7a7..6494092b8 100644 --- a/html/mobile.php +++ b/html/mobile.php @@ -30,7 +30,7 @@ global $g_user; $cn=new Database(); $g_user=new \User($cn); $g_user->check(); -define ('ALLOWED',true); +if ( !defined ("ALLOWED") ) { define ('ALLOWED',true); } //----------------------------------------------------------------- /// if $_REQUEST['gDossier'] is not set then select the folder