Merge pull request #7879 from MrPetovan/bug/warnings
Fix ACL-related warnings
This commit is contained in:
commit
b61f475c47
|
@ -30,15 +30,26 @@ class Page implements ArrayAccess
|
|||
/**
|
||||
* @var array Contains all stylesheets, which should get loaded during page
|
||||
*/
|
||||
private $stylesheets;
|
||||
private $stylesheets = [];
|
||||
/**
|
||||
* @var array Contains all scripts, which are added to the footer at last
|
||||
*/
|
||||
private $footerScripts;
|
||||
private $footerScripts = [];
|
||||
/**
|
||||
* @var array The page content, which are showed directly
|
||||
*/
|
||||
private $page;
|
||||
private $page = [
|
||||
'aside' => '',
|
||||
'bottom' => '',
|
||||
'content' => '',
|
||||
'footer' => '',
|
||||
'htmlhead' => '',
|
||||
'nav' => '',
|
||||
'page_title' => '',
|
||||
'right_aside' => '',
|
||||
'template' => '',
|
||||
'title' => '',
|
||||
];
|
||||
/**
|
||||
* @var string The basepath of the page
|
||||
*/
|
||||
|
@ -50,19 +61,6 @@ class Page implements ArrayAccess
|
|||
public function __construct(string $basepath)
|
||||
{
|
||||
$this->basePath = $basepath;
|
||||
|
||||
$this->page = [
|
||||
'aside' => '',
|
||||
'bottom' => '',
|
||||
'content' => '',
|
||||
'footer' => '',
|
||||
'htmlhead' => '',
|
||||
'nav' => '',
|
||||
'page_title' => '',
|
||||
'right_aside' => '',
|
||||
'template' => '',
|
||||
'title' => ''
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -333,6 +333,13 @@ class ACL extends BaseObject
|
|||
// Defaults user permissions
|
||||
if (empty($default_permissions)) {
|
||||
$default_permissions = self::getDefaultUserPermissions($user);
|
||||
} else {
|
||||
$default_permissions = [
|
||||
'allow_cid' => $default_permissions['allow_cid'] ?? [],
|
||||
'allow_gid' => $default_permissions['allow_gid'] ?? [],
|
||||
'deny_cid' => $default_permissions['deny_cid'] ?? [],
|
||||
'deny_gid' => $default_permissions['deny_gid'] ?? [],
|
||||
];
|
||||
}
|
||||
|
||||
if (count($default_permissions['allow_cid'])
|
||||
|
@ -352,7 +359,7 @@ class ACL extends BaseObject
|
|||
$pubmail_enabled = false;
|
||||
|
||||
if (function_exists('imap_open') && !Config::get('system', 'imap_disabled')) {
|
||||
$mailacct = DBA::selectFirst('mailacct', ['pubmail'], ['`uid` = ? AND `server` != ""', $user['úid']]);
|
||||
$mailacct = DBA::selectFirst('mailacct', ['pubmail'], ['`uid` = ? AND `server` != ""', $user['uid']]);
|
||||
if (DBA::isResult($mailacct)) {
|
||||
$mail_enabled = true;
|
||||
$pubmail_enabled = !empty($mailacct['pubmail']);
|
||||
|
|
Loading…
Reference in a new issue