aboutsummaryrefslogtreecommitdiffstats
path: root/mod/settings.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/settings.php')
-rw-r--r--mod/settings.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/mod/settings.php b/mod/settings.php
index ab6638ccb..ea7b2ba06 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -160,7 +160,9 @@ function settings_post(&$a) {
$itemspage = 100;
- if($mobile_theme !== '') {
+ if ($mobile_theme == "---")
+ del_pconfig(local_user(),'system','mobile_theme');
+ else {
set_pconfig(local_user(),'system','mobile_theme',$mobile_theme);
}
@@ -755,7 +757,6 @@ function settings_content(&$a) {
$themes = array();
- $mobile_themes = array("---" => t('No special theme for mobile devices'));
$files = glob('view/theme/*');
if($allowed_themes) {
foreach($allowed_themes as $th) {
@@ -763,15 +764,21 @@ function settings_content(&$a) {
$is_experimental = file_exists('view/theme/' . $th . '/experimental');
$unsupported = file_exists('view/theme/' . $th . '/unsupported');
$is_mobile = file_exists('view/theme/' . $th . '/mobile');
+ $is_library = file_exists('view/theme/'. $th . '/library');
+ $mobile_themes["---"] = t("No special theme for mobile devices");
+
if (!$is_experimental or ($is_experimental && (get_config('experimentals','exp_themes')==1 or get_config('experimentals','exp_themes')===false))){
$theme_name = (($is_experimental) ? sprintf(t('%s - (Experimental)'), $f) : $f);
- if($is_mobile) {
- $mobile_themes[$f]=$theme_name;
- }
- else {
- $themes[$f]=$theme_name;
+ if (! $is_library) {
+ if($is_mobile) {
+ $mobile_themes[$f] = $themes[$f] = $theme_name . ' (' . t('mobile') . ')';
+ }
+ else {
+ $mobile_themes[$f] = $themes[$f] = $theme_name;
+ }
}
}
+
}
}
$theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']);