diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-26 08:30:19 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-26 08:30:19 +0000 |
commit | 1a5f3010e30f2df1594cffb2bb8c2c9147d17816 (patch) | |
tree | 53b14b31f069d67ea121014134edaaeb8566f269 /modules/system | |
parent | a989f6cd50a21c8cb41af3cba4c604502cc46345 (diff) | |
download | brdo-1a5f3010e30f2df1594cffb2bb8c2c9147d17816.tar.gz brdo-1a5f3010e30f2df1594cffb2bb8c2c9147d17816.tar.bz2 |
#188498 by Rob Loach: user profile category names are stored and compared case insensitively, but the reserved category name check was not case insensitive
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.install | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index 43650b93d..d3e35e78d 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -2703,6 +2703,20 @@ function system_update_6037() { } /** + * Ensure that "Account" is not used as a Profile category. + */ +function system_update_6038() { + $ret = array(); + if (db_table_exists('profile_fields')) { + $ret[] = update_sql('UPDATE {profile_fields} SET category = "Account settings" WHERE LOWER(category) = "account"'); + if ($affectedrows = db_affected_rows()) { + drupal_set_message(t('There were @affectedrows profile fields that used a reserved category name. They have been assigned to the category "Account settings".', array('@affectedrows' => $affectedrows))); + } + } + return $ret; +} + +/** * @} End of "defgroup updates-5.x-to-6.x" * The next series of updates should start at 7000. */ |