Commit cc834048 authored by mig5's avatar mig5 Committed by mig5

#710652 by adrian - set old_url properly. Also, fix files table UPDATE query

parent 34941d1c
......@@ -2,7 +2,7 @@
// $Id$
$new_url = drush_get_option('site_url');
$old_url = drush_get_option('site_url', 'site');
$old_url = drush_get_option('site_url', '', 'site');
/**
* @file
......@@ -15,7 +15,7 @@ drush_log(
dt('Changed paths from sites/@old_url to sites/@new_url',
array('@old_url' => $old_url, '@new_url' => $new_url)));
db_query("UPDATE {files} SET filepath=replace(filepath, 'sites/%', 'sites/%')", $old_url, $new_url);
db_query("UPDATE {files} SET filepath=replace(filepath, 'sites/%s', 'sites/%s')", $old_url, $new_url);
db_query("UPDATE {users} SET picture = replace(picture, 'sites/%s', 'sites/%s')", $old_url, $new_url);
variable_set('file_directory_path', "sites/$new_url/files");
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