diff options
Diffstat (limited to 'phpBB/phpbb/permissions.php')
-rw-r--r-- | phpBB/phpbb/permissions.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php index 89a4579ae2..e75476f59b 100644 --- a/phpBB/phpbb/permissions.php +++ b/phpBB/phpbb/permissions.php @@ -160,6 +160,28 @@ class permissions } /** + * Checks if a category has been defined + * + * @param string $category Identifier of the category + * @return bool True if the category is defined, false otherwise + */ + public function category_defined($category) + { + return isset($this->categories[$category]); + } + + /** + * Checks if a permission has been defined + * + * @param string $permission Identifier of the permission + * @return bool True if the permission is defined, false otherwise + */ + public function permission_defined($permission) + { + return isset($this->permissions[$permission]); + } + + /** * Returns the language string of a permission * * @param string $permission Identifier of the permission |