noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 11/26: Task #0002050: stay in mobile menu


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 11/26: Task #0002050: stay in mobile menu
Date: Wed, 11 Aug 2021 11:08:12 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit a2a1ebda25a645d2ab30084a8be3914369dbc60c
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Jul 30 16:46:33 2021 +0200

    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 f2775ee..4fc7ada 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 '</p>';
     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 7fc7ea7..6494092 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]