Commit b5b6b32e authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#158927 by John Morahan: first time, the default admin theme name is '0', so...

#158927 by John Morahan: first time, the default admin theme name is '0', so block initialization gives warnings. Avoid this initialization until we have a theme selected
parent 5d5b285d
......@@ -517,7 +517,7 @@ function system_admin_menu_block($item) {
function system_admin_theme_submit($form, &$form_state) {
// If we're changing themes, make sure the theme has its blocks initialized.
if ($form_state['values']['admin_theme'] != variable_get('admin_theme', '0')) {
if ($form_state['values']['admin_theme'] && $form_state['values']['admin_theme'] != variable_get('admin_theme', '0')) {
$result = db_result(db_query("SELECT COUNT(*) FROM {blocks} WHERE theme = '%s'", $form_state['values']['admin_theme']));
if (!$result) {
system_initialize_theme_blocks($form_state['values']['admin_theme']);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment