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

Gábor Hojtsy - September 25, 2008 - 08:14

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

Gábor Hojtsy - October 13, 2008 - 21:30
Version:6.x-2.x-dev» 5.x-2.x-dev
Status:active» patch (to be ported)

#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.

AttachmentSize
hook_perm_drupal-7.patch 859 bytes

#3

Gábor Hojtsy - August 24, 2009 - 13:07
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.

#4

System Message - September 7, 2009 - 13:10
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.