diff options
Diffstat (limited to 'phpBB/includes/permissions.php')
| -rw-r--r-- | phpBB/includes/permissions.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/phpBB/includes/permissions.php b/phpBB/includes/permissions.php index ddeadc825b..f3b2ab5da0 100644 --- a/phpBB/includes/permissions.php +++ b/phpBB/includes/permissions.php @@ -84,6 +84,16 @@ class phpbb_permissions } /** + * Returns the language string of a permission category + * + * @return array Language string + */ + public function get_lang_category($category) + { + return $this->user->lang($this->categories[$category]); + } + + /** * Returns an array with all the permission types (a_, u_, m_, etc.) * * @return array Layout: type-identifier => Language key @@ -94,6 +104,25 @@ class phpbb_permissions } /** + * Returns the language string of a permission type + * + * @return array Language string + */ + public function get_lang_type($type, $scope = false) + { + if ($scope && isset($this->types[$scope][$type])) + { + $lang_key = $this->types[$scope][$type]; + } + else + { + $lang_key = $this->types[$type]; + } + + return $this->user->lang($lang_key); + } + + /** * Returns an array with all the permissions. * Each Permission has the following layout: * 'acl_<type><permission>' => array( |
