Commit 757c567e authored by webchick's avatar webchick
Browse files

#654014 by moshe weitzman: Fix broken update functions.

parent daa59856
......@@ -226,7 +226,7 @@ function block_install() {
*/
function block_update_7000() {
db_update('system')
->fields(array('weight', '-5'))
->fields(array('weight' => '-5'))
->condition('name', 'block')
->execute();
}
......
......@@ -73,7 +73,7 @@ function comment_update_7001() {
foreach ($changes as $old => $new) {
db_update('comments')
->fields(array('status', $new))
->fields(array('status' => $new))
->condition('status', $old)
->execute();
}
......
......@@ -194,11 +194,11 @@ function filter_update_7003() {
// Loop through each filter and make changes to the core filter table.
foreach ($renamed_deltas as $module => $deltas) {
foreach ($deltas as $old_delta => $new_delta) {
db_update('filter')
->fields(array('name', $new_delta))
->condition('module', $module)
->condition('name', $old_delta)
->execute();
db_update('filter')
->fields(array('name' => $new_delta))
->condition('module', $module)
->condition('name', $old_delta)
->execute();
}
}
}
......
......@@ -352,15 +352,15 @@ function user_update_7002(&$sandbox) {
}
}
if ($timezone) {
db_update('users')
->fields(array('timezone' => $timezone))
->condition('uid', $account->uid)
->execute();
db_update('users')
->fields(array('timezone' => $timezone))
->condition('uid', $account->uid)
->execute();
}
else {
$sandbox['user_not_migrated']++;
db_update('users')
->fields(array('timezone', NULL))
->fields(array('timezone' => NULL))
->condition('uid', $account->uid)
->execute();
}
......
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