mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user