diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-26 10:14:10 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-26 10:14:10 +0000 |
commit | 31ba4b8cbbd50a87e9ada828980b7223a1d5e2b6 (patch) | |
tree | dab3995e89699fcd71debe5877b9b93f71034074 | |
parent | ff9953b398fc9c45de44c1c9d09154d7fed0b3e1 (diff) | |
download | brdo-31ba4b8cbbd50a87e9ada828980b7223a1d5e2b6.tar.gz brdo-31ba4b8cbbd50a87e9ada828980b7223a1d5e2b6.tar.bz2 |
#608894 follow-up by mr.baileys: Better method of hiding Profile module from the UI on new sites.
-rw-r--r-- | modules/profile/profile.info | 5 | ||||
-rw-r--r-- | modules/user/user.module | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/modules/profile/profile.info b/modules/profile/profile.info index cc27ac146..03745635c 100644 --- a/modules/profile/profile.info +++ b/modules/profile/profile.info @@ -10,3 +10,8 @@ files[] = profile.pages.inc files[] = profile.install files[] = profile.test configure = admin/config/people/profile +; The Profile module is deprecated, and included in Drupal 7 for legacy +; purposes only. By default, the module will be hidden from the UI unless you +; are upgrading a site that uses the Profile module to extend user profiles. +; See user_system_info_alter(). +hidden = TRUE diff --git a/modules/user/user.module b/modules/user/user.module index ff1869f10..96c26e0f4 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -3746,13 +3746,13 @@ function user_file_download_access($field, $entity_type, $entity) { * * To prevent new Drupal 7 sites from installing Profile module, and * unwittingly ending up with two completely different and incompatible methods - * of extending users, remove it from the available modules by setting it to - * hidden if the profile_* tables are not already present. + * of extending users, only make the Profile module available if the profile_* + * tables are present. * * @todo: Remove in D8, pending upgrade path. */ function user_system_info_alter(&$info, $file, $type) { - if ($type == 'module' && $file->name == 'profile' && !db_table_exists('profile_field')) { - $info['hidden'] = TRUE; + if ($type == 'module' && $file->name == 'profile' && db_table_exists('profile_field')) { + $info['hidden'] = FALSE; } } |