summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--platform/drupal/deploy.inc24
1 files changed, 24 insertions, 0 deletions
diff --git a/platform/drupal/deploy.inc b/platform/drupal/deploy.inc
index 06ee372..68f1d63 100644
--- a/platform/drupal/deploy.inc
+++ b/platform/drupal/deploy.inc
@@ -20,3 +20,27 @@ db_query("UPDATE {users} SET picture = replace(picture, 'sites/%s', 'sites/%s')"
variable_set('file_directory_path', "sites/$new_url/files");
variable_set('file_directory_temp', "sites/$new_url/files/tmp");
+// Global theme settings paths.
+if ($var = variable_get('theme_settings', FALSE)) {
+ $var['logo_path'] = str_replace($old_url, $new_url, $var['logo_path']);
+ $var['favicon_path'] = str_replace($old_url, $new_url, $var['favicon_path']);
+ variable_set('theme_settings', $var);
+}
+
+$themes = list_themes();
+foreach (array_keys($themes) as $theme) {
+ // Update logo and favicon paths for each theme.
+ if ($var = variable_get('theme_'. $theme .'_settings', FALSE)) {
+ $var['logo_path'] = str_replace($old_url, $new_url, $var['logo_path']);
+ $var['favicon_path'] = str_replace($old_url, $new_url, $var['favicon_path']);
+ variable_set('theme_'. $theme .'_settings', $var);
+ }
+ // Update color module paths.
+ if (module_exists('color')) {
+ foreach (array('_files', '_logo', '_screenshot', '_stylesheets') as $suffix) {
+ if ($var = variable_get('color_'. $theme . $suffix, FALSE)) {
+ variable_set('color_'. $theme . $suffix, str_replace($old_url, $new_url, $var));
+ }
+ }
+ }
+}