Implement new hook_perm() parsing for 7.x
Gábor Hojtsy - September 10, 2008 - 10:25
| Project: | Translation template extractor |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
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

#1
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
#2
#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.
#3
Since 5.x is not maintained, moving back to fixed.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.