Commit 92d94834 authored by anarcat's avatar anarcat Committed by anarcat
parents 5a52d80a 0b9ac048
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
$new_url = drush_get_option('site_url'); $new_url = drush_get_option('site_url');
$old_url = drush_get_option('site_url', 'site'); $old_url = drush_get_option('site_url', 'site');
$sql_args = array(':oldpath' => "sites/$old_url", ':newpath' => "sites/$new_url");
/** /**
* @file * @file
* Handle site migration tasks for redeployed sites. * Handle site migration tasks for redeployed sites.
...@@ -17,8 +15,7 @@ drush_log( ...@@ -17,8 +15,7 @@ drush_log(
dt('Changed paths from sites/@old_url to sites/@new_url', dt('Changed paths from sites/@old_url to sites/@new_url',
array('@old_url' => $old_url, '@new_url' => $new_url))); array('@old_url' => $old_url, '@new_url' => $new_url)));
db_query("UPDATE {files} SET filepath=replace(filepath, :oldpath, :newpath)", $sql_args); variable_set('file_public_path', "sites/$new_url/files");
db_query("UPDATE {users} SET picture = replace(picture, :oldpath, :newpath)", $sql_args); variable_set('file_private_path', "sites/$new_url/private/files");
variable_set('file_directory_path', "sites/$new_url/files"); variable_set('file_temporary_path', "sites/$new_url/private/temp");
variable_set('file_directory_temp', "sites/$new_url/files/tmp");
Markdown is supported
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