--- sites/all/modules/domain/domain_theme/domain_theme.admin.inc 2009-06-11 22:10:50.000000000 -0400 +++ sites/all/modules/domain/domain_theme/domain_theme.admin.inc.new 2009-06-11 21:29:36.000000000 -0400 @@ -130,8 +130,6 @@ function domain_theme_form_alter(&$form, return drupal_access_denied(); } - $color_info = color_get_info($theme); - drupal_set_title(t('!site : %theme settings', array('!site' => $domain['sitename'], '%theme' => $theme))); // Which domain are we editing? $form['domain_id'] = array( @@ -151,22 +149,24 @@ function domain_theme_form_alter(&$form, } } ksort($form['#submit']); + // Check for the presence of color.module. - if (empty($color_info)) { - return; - } + if (module_exists('color')) { + $color_info = color_get_info($theme); - // Color module will reset the values in {variable}. which we don't - // want to happen. So we have to grab the existing values and store - // them so that we can set the {variable} table correctly. - // TODO: Make this work with Domain Prefix. - $vars = array('palette', 'stylesheets', 'logo', 'files', 'screenshot'); - foreach ($vars as $variable) { - $name = 'color_'. $theme .'_'. $variable; - $value = db_result(db_query("SELECT value FROM {variable} WHERE name = '%s'", $name)); - $color_settings[$name] = isset($value) ? $value : NULL; + // Color module will reset the values in {variable}. which we don't + // want to happen. So we have to grab the existing values and store + // them so that we can set the {variable} table correctly. + // TODO: Make this work with Domain Prefix. + $vars = array('palette', 'stylesheets', 'logo', 'files', 'screenshot'); + foreach ($vars as $variable) { + $name = 'color_'. $theme .'_'. $variable; + $value = db_result(db_query("SELECT value FROM {variable} WHERE name = '%s'", $name)); + $color_settings[$name] = isset($value) ? $value : NULL; + } + $form['domain_color_defaults'] = array('#type' => 'value', '#value' => $color_settings); } - $form['domain_color_defaults'] = array('#type' => 'value', '#value' => $color_settings); + } /**