added mobile device detection

This commit is contained in:
SJ
2013-08-06 11:32:02 +02:00
parent fa76a1a0e7
commit e8f3b51ca5
3 changed files with 13 additions and 1 deletions

View File

@@ -237,6 +237,10 @@ require_once 'config-site.php';
if(isset($_SESSION['theme']) && preg_match("/^([a-zA-Z0-9\-\_]+)$/", $_SESSION['theme'])) { $config['THEME'] = $_SESSION['theme']; }
include("/system/helper/detectmobilebrowser.php");
if(MOBILE_DEVICE == 1) { $config['THEME'] = 'mobile'; }
// make sure auditors are restricted in a saas environment
if($config['ENABLE_SAAS'] == 1) { $config['RESTRICTED_AUDITOR'] = 1; }
if(isset($_SESSION['username']) && $_SESSION['username'] == 'auditor@local') { $config['RESTRICTED_AUDITOR'] = 0; }