Changeset 13172 for trunk/admin
- Timestamp:
- Feb 15, 2012, 5:52:24 PM (12 years ago)
- Location:
- trunk/admin
- Files:
-
- 2 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">
Note: See TracChangeset
for help on using the changeset viewer.