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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | hook_perm_drupal-7.patch | 859 bytes | gábor hojtsy |
Comments
Comment #1
gábor hojtsyhook_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
Comment #2
gábor hojtsy#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.
Comment #3
gábor hojtsySince 5.x is not maintained, moving back to fixed.