Changeset 13172
- Timestamp:
- Feb 15, 2012, 5:52:24 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/themes.class.php
r12922 r13172 49 49 function perform_action($action, $theme_id) 50 50 { 51 global $conf; 52 51 53 if (isset($this->db_themes_by_id[$theme_id])) 52 54 { … … 87 89 } 88 90 91 if ($this->fs_themes[$theme_id]['mobile'] and !empty($conf['mobile_theme'])) 92 { 93 array_push($errors, l10n('You can activate only one mobile theme.')); 94 break; 95 } 96 89 97 if (file_exists($file_to_include)) 90 98 { … … 106 114 ;'; 107 115 pwg_query($query); 116 117 if ($this->fs_themes[$theme_id]['mobile']) 118 { 119 conf_update_param('mobile_theme', $theme_id); 120 } 108 121 } 109 122 break; … … 165 178 ;'; 166 179 pwg_query($query); 180 181 if ($this->fs_themes[$theme_id]['mobile']) 182 { 183 conf_update_param('mobile_theme', ''); 184 } 167 185 break; 168 186 … … 326 344 'description' => '', 327 345 'author' => '', 346 'mobile' => false, 328 347 ); 329 348 $theme_data = implode( '', file($path.'/themeconf.inc.php') ); … … 366 385 $theme['parent'] = $val[1]; 367 386 } 368 if (preg_match('/["\']activable["\'].*?(true|false)/ ', $theme_data, $val))387 if (preg_match('/["\']activable["\'].*?(true|false)/i', $theme_data, $val)) 369 388 { 370 389 $theme['activable'] = get_boolean($val[1]); 390 } 391 if (preg_match('/["\']mobile["\'].*?(true|false)/i', $theme_data, $val)) 392 { 393 $theme['mobile'] = get_boolean($val[1]); 371 394 } 372 395 -
trunk/admin/themes/default/template/themes_installed.tpl
r12613 r13172 18 18 {foreach from=$active_themes item=theme} 19 19 <div class="themeBox{if $theme.is_default} themeDefault{/if}"> 20 <div class="themeName">{$theme.name}{if $theme.is_default} <em>({'default'|@translate})</em>{/if} </div>20 <div class="themeName">{$theme.name}{if $theme.is_default} <em>({'default'|@translate})</em>{/if} {if $theme.mobile} <em>({'mobile'|@translate})</em>{/if}</div> 21 21 <div class="themeShot"><a href="{$theme.screenshot}" class="preview-box" title="{$theme.name}"><img src="{$theme.screenshot}" alt=""></a></div> 22 22 <div class="themeActions"> … … 48 48 {foreach from=$inactive_themes item=theme} 49 49 <div class="themeBox"> 50 <div class="themeName">{$theme.name} </div>50 <div class="themeName">{$theme.name}{if $theme.mobile} <em>({'mobile'|@translate})</em>{/if}</div> 51 51 <div class="themeShot"><a href="{$theme.screenshot}" class="preview-box" title="{$theme.name}"><img src="{$theme.screenshot}" alt=""></a></div> 52 52 <div class="themeActions"> -
trunk/include/common.inc.php
r12922 r13172 193 193 else 194 194 { // Classic template 195 $template = new Template(PHPWG_ROOT_PATH.'themes', $user['theme'] ); 195 $theme = $user['theme']; 196 197 if (!isset($_SESSION['is_mobile'])) 198 { 199 include_once(PHPWG_ROOT_PATH.'include/mdetect.php'); 200 $uagent_obj = new uagent_info(); 201 if ($_SESSION['is_mobile'] = $uagent_obj->DetectMobileLong()) 202 { 203 $_SESSION['use_mobile_theme'] = !empty($conf['mobile_theme']); 204 } 205 } 206 if ($_SESSION['is_mobile']) 207 { 208 if (isset($_REQUEST['mobile'])) 209 { 210 $_SESSION['use_mobile_theme'] = get_boolean($_REQUEST['mobile']); 211 } 212 if ($_SESSION['use_mobile_theme']) 213 { 214 $theme = $conf['mobile_theme']; 215 } 216 } 217 $template = new Template(PHPWG_ROOT_PATH.'themes', $theme ); 196 218 } 197 219 -
trunk/language/en_UK/admin.lang.php
r13068 r13172 846 846 $lang['Center of interest'] = 'Center of interest'; 847 847 $lang['Move to album'] = 'Move to album'; 848 $lang['You can activate only one mobile theme.'] = 'You can activate only one mobile theme.'; 849 $lang['mobile'] = 'mobile'; 848 850 ?> -
trunk/language/fr_FR/admin.lang.php
r13068 r13172 847 847 $lang['%s has been successfully updated.'] = '%s a été mis à jour avec succès.'; 848 848 $lang['Move to album'] = 'Déplacer vers l\'album'; 849 $lang['You can activate only one mobile theme.'] = 'Vous ne pouvez activer qu\'un seul thème mobile.'; 850 $lang['mobile'] = 'mobile'; 849 851 ?>
Note: See TracChangeset
for help on using the changeset viewer.