Splitting off from #306027: user_modules_uninistalled() is missing.

So we have hook_perm()

This could be hook_permission() hook_permissions() or hook_permissions_info()

CommentFileSizeAuthor
#3 506976.patch20.91 KBasimmonds
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

catch’s picture

Title: Rename stop abbreviating permissions » Stop abbreviating permissions to perm
agentrickard’s picture

hook_permission() seems more in line with core -- e.g. hook_user, hook_block...

asimmonds’s picture

Status: Active » Needs review
FileSize
20.91 KB

Initial attempt at renaming hook_perm to hook_permission, hope I got them all...

Dries’s picture

Issue tags: +Favorite-of-Dries

Yes, p-uh-lease! :)

agentrickard’s picture

Status: Needs review » Reviewed & tested by the community

There is a stray user_admin_perm() menu callback that is unrelated. Otherwise, the patch caught all instances.

See #510740: Rename user_admin_perm() for that. Otherwise RTBC.

Dries’s picture

Status: Reviewed & tested by the community » Needs work

Committed to CVS HEAD. Thanks catch.

We need to update the upgrade instructions in the handbook so I'm marking this 'code needs work'.

agentrickard’s picture

Status: Needs work » Reviewed & tested by the community

Done.

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed
Xano’s picture

Shouldn't this be hook_permission_info(), since we provide information about permissions and do not process anything in there?

agentrickard’s picture

@Xano

I hope not. By that standard, we would have hook_menu_info() and hook_theme_info() as well., plus others, I am sure.

Do we have any agreed upon standards for function naming that we can reference here?

catch’s picture

Crell's arguing for a lot of these 'called once, cached, never called again' hooks to all be renamed to hook_$hook_info() - not sure if there's a renaming issue anywhere though - but it's not really connected to this specific one anyway.

agentrickard’s picture

OK, so we can clean this up as part of that initiative and don't need to discuss here?

catch’s picture

I think so yeah.

Status: Fixed » Closed (fixed)
Issue tags: -Favorite-of-Dries

Automatically closed -- issue fixed for 2 weeks with no activity.