Changeset 13172 for trunk/admin/include/themes.class.php
- Timestamp:
- Feb 15, 2012, 5:52:24 PM (12 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.