From 029e7b8828adbbe6c68d5f3809abaca5f704ad3c Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 28 Jun 2010 02:05:47 +0000 Subject: #838438 by Damien Tournoud, chx: Added basic tests for D6 => D7 upgrade path, and framework for further extending upgrade test coverage. W00t! :D --- modules/user/user.install | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'modules/user') diff --git a/modules/user/user.install b/modules/user/user.install index 2a2b6da6f..cd69c4c6c 100644 --- a/modules/user/user.install +++ b/modules/user/user.install @@ -323,6 +323,23 @@ function user_install() { } } +/** + * Implements hook_update_dependencies(). + */ +function user_update_dependencies() { + // Run all the critical user upgrades before everything. + $dependencies['system'][7000] = array( + 'user' => 7008, + ); + // user_update_7006 relies on filter_update_7002. + // TODO: move user_update_7006 down below in the upgrade process. + $dependencies['user'][7006] = array( + 'filter' => 7002, + ); + + return $dependencies; +} + /** * @defgroup user-updates-6.x-to-7.x User updates from 6.x to 7.x * @{ @@ -639,6 +656,20 @@ function user_update_7009() { db_change_field('users', 'data', 'data', $spec); } +/** + * Update the {user}.signature_format column. + */ +function user_update_7010() { + // It was previously possible for a value of "0" to be stored in database + // tables to indicate that a particular piece of text should be filtered + // using the default text format. + $default_format = variable_get('filter_default_format', 1); + db_update('users') + ->fields(array('signature_format' => $default_format)) + ->condition('signature_format', 0) + ->execute(); +} + /** * @} End of "defgroup user-updates-6.x-to-7.x" * The next series of updates should start at 8000. -- cgit v1.2.3