plugins/admin/ThemeManager.php
changeset 477 c4d6e9b3b964
parent 471 7906fb190fc1
child 504 bc8e0e9ee01d
equal deleted inserted replaced
476:f26a69c40431 477:c4d6e9b3b964
   398       $q = $db->sql_query('DELETE FROM ' . table_prefix . "themes WHERE theme_id = '$theme_id';");
   398       $q = $db->sql_query('DELETE FROM ' . table_prefix . "themes WHERE theme_id = '$theme_id';");
   399       if ( !$q )
   399       if ( !$q )
   400         $db->die_json();
   400         $db->die_json();
   401       
   401       
   402       // Change all the users that were on that theme to the default
   402       // Change all the users that were on that theme to the default
   403       $default_style = $themes[$theme_default]['default_style'];
   403       $default_style = $template->named_theme_list[$theme_default]['default_style'];
   404       $default_style = preg_replace('/\.css$/', '', $default_style);
   404       $default_style = preg_replace('/\.css$/', '', $default_style);
   405       
   405       
   406       $theme_default = $db->escape($theme_default);
   406       $theme_default = $db->escape($theme_default);
   407       $default_style = $db->escape($default_style);
   407       $default_style = $db->escape($default_style);
   408       
   408