diff options
Diffstat (limited to 'modules/contact/contact.install')
-rw-r--r-- | modules/contact/contact.install | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/modules/contact/contact.install b/modules/contact/contact.install index 5ec5dcbcd..435156ded 100644 --- a/modules/contact/contact.install +++ b/modules/contact/contact.install @@ -90,18 +90,6 @@ function contact_uninstall() { } /** - * Implements hook_update_dependencies(). - */ -function contact_update_dependencies() { - // Contact update 7002 calls the new user_role_grant_permissions() and - // therefore needs to run after user_update_7006(); - $dependencies['contact'][7002] = array( - 'user' => 7006, - ); - return $dependencies; -} - -/** * @defgroup updates-6.x-to-7.x Contact updates from 6.x to 7.x * @{ */ @@ -128,7 +116,16 @@ function contact_update_7001() { * Enable the 'access user contact forms' for registered users by default. */ function contact_update_7002() { - user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access user contact forms')); + // Do not use user_role_grant_permission() since it relies on + // hook_permission(), which will not run for contact module if it is + // disabled. + db_merge('role_permission') + ->key(array( + 'rid' => DRUPAL_AUTHENTICATED_RID, + 'permission' => 'access user contact forms', + 'module' => 'contact', + )) + ->execute(); } /** |