Details
-
Improvement
-
Status: Open (View Workflow)
-
Trivial
-
Resolution: Unresolved
-
3.1.10, 3.2.0-RC1
-
None
-
None
Description
Hello
For my QTE extension i want create a new permission for each attribute created (It's easier to mange users/groups permissions with phpBB permission system instead of create mine).
So I could, in Group forum permissions, get something like this:
Can use "Resolved" attribute: yes non never
Can use "Deleted" attribute: yes non never
For that, i need to use a single formatted language string like
"Can use %s attribute"
My problem ? see:
In get_permission_lang() function:
public function get_permission_lang($permission) |
{
|
return (isset($this->permissions[$permission]['lang'])) ? $this->user->lang($this->permissions[$permission]['lang']) : $this->user->lang('ACL_' . strtoupper($permission)); |
}
|
In my case,
$this->permissions[$permission]['lang']
|
$permissions += array( |
// ACP |
'f_attr_'.$row['attr_id'] => array('lang' => array('CAN_USE_ATTR', $row['attr_name']), 'cat' => 'qte'), |
);
|
I may be cheating by using
$permissions += array( |
// ACP |
'f_attr_'.$row['attr_id'] => array('lang' => $this->user->lang('CAN_USE_ATTR', $row['attr_name']), 'cat' => 'qte'), |
);
|
What do you think guys ?