summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Beaupré2010-12-20 19:25:22 (GMT)
committeranarcat2010-12-20 19:25:22 (GMT)
commit231c473d6c559b1348485031147d36b8347baf96 (patch)
tree6ad7a5b94e80ab6667f4fdf4354a9e75d23a0fe5
parentef36954b6a79e6b29cf8409de43fc62fcc2d6f7f (diff)
#791262 - update color and theme paths during deploy
-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));
+ }
+ }
+ }
+}