Hook_perm() changed to include permission descriptions. The returned array is an associative array, the keys are permission names (still to export for translation), while the descriptions are t() wrapped, so they will work automatically. Due to the array format change, we need to have a custom parser for 7.x hook_perm() implementations.

Code change explained at http://drupal.org/node/224333#descriptions-permissions

CommentFileSizeAuthor
#2 hook_perm_drupal-7.patch859 bytesgábor hojtsy

Comments

gábor hojtsy’s picture

hook_perm() might change even more. Original change at http://drupal.org/node/30984 and I am suggesting better code for localization in hook_perm() at http://drupal.org/node/313213

gábor hojtsy’s picture

Version: 6.x-2.x-dev » 5.x-2.x-dev
Status: Active » Patch (to be ported)
StatusFileSize
new859 bytes

#313213: Fix broken localization for permission names is committed now and lets us skip hook_perm() from Drupal 7 altogether, since hook_perm() is now using standard t() with placeholders even for composite permissions, so hook_perm() support for Drupal 7 just means we skip that part of the code from then on :) Great.

Committed to 6.x-2.x. Needs to be ported.

gábor hojtsy’s picture

Version: 5.x-2.x-dev » 6.x-2.x-dev
Status: Patch (to be ported) » Fixed

Since 5.x is not maintained, moving back to fixed.

Status: Fixed » Closed (fixed)

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