aboutsummaryrefslogtreecommitdiffstats
path: root/include/common.inc.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2012-02-18 20:26:52 +0000
committerpatdenice <patdenice@piwigo.org>2012-02-18 20:26:52 +0000
commit26ed60c972da7e18325c35a62e72025d1a70fbf1 (patch)
treedbbd725d4b44402ec9c4b1b149db52c4fe886173 /include/common.inc.php
parent4b696df2dad09a333ee41705e2236fb0d986e0c1 (diff)
feature:2577
Many improvements git-svn-id: http://piwigo.org/svn/trunk@13234 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/common.inc.php')
-rw-r--r--include/common.inc.php23
1 files changed, 1 insertions, 22 deletions
diff --git a/include/common.inc.php b/include/common.inc.php
index 158dbf1ef..378b9b4e0 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -192,28 +192,7 @@ if (defined('IN_ADMIN') and IN_ADMIN )
}
else
{ // Classic template
- $theme = $user['theme'];
-
- if (!isset($_SESSION['is_mobile']))
- {
- include_once(PHPWG_ROOT_PATH.'include/mdetect.php');
- $uagent_obj = new uagent_info();
- if ($_SESSION['is_mobile'] = $uagent_obj->DetectMobileLong())
- {
- $_SESSION['use_mobile_theme'] = !empty($conf['mobile_theme']);
- }
- }
- if ($_SESSION['is_mobile'])
- {
- if (isset($_REQUEST['mobile']))
- {
- $_SESSION['use_mobile_theme'] = get_boolean($_REQUEST['mobile']);
- }
- if ($_SESSION['use_mobile_theme'])
- {
- $theme = $conf['mobile_theme'];
- }
- }
+ $theme = mobile_theme() ? $conf['mobile_theme'] : $user['theme'];
$template = new Template(PHPWG_ROOT_PATH.'themes', $theme );
}