Config class rewrite (#6965)

* Use a singleton pattern in the database class to re-use the database object inside the permission_exists function.
This commit is contained in:
frytimo
2024-04-27 22:22:20 -03:00
committed by GitHub
parent 8a30f04125
commit 0b8edef82c
5 changed files with 368 additions and 141 deletions

View File

@@ -324,7 +324,8 @@
if (!function_exists('permission_exists')) {
function permission_exists($permission_name, $operator = 'or') {
$permission = new permissions;
$database = database::new();
$permission = new permissions($database);
return $permission->exists($permission_name);
}