From 08504c4e16c767ed5c47c7eeb4bfe2f652240221 Mon Sep 17 00:00:00 2001 From: javieralapps4up Date: Tue, 21 Sep 2021 00:45:06 +0200 Subject: [PATCH 1/3] Update main.inc.php --- htdocs/main.inc.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 9bcf6238b36..7efaf0d02ca 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1042,6 +1042,17 @@ if (!defined('NOLOGIN')) { //Required if advanced permissions are used with MAIN_USE_ADVANCED_PERMS if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { + + if (empty($user->rights->user->user_advance)) { + $user->rights->user->user_advance = new stdClass(); // To avoid warnings + } + if (empty($user->rights->user->user_advance)) { + $user->rights->user->self_advance = new stdClass(); // To avoid warnings + } + if (empty($user->rights->user->user_advance)) { + $user->rights->user->group_advance = new stdClass(); // To avoid warnings + } + $user->rights->user->user_advance->readperms = 1; $user->rights->user->user_advance->write = 1; $user->rights->user->self_advance->readperms = 1; From a8a8fd7cffc805a2a470d5840dfa3d82ea4b7218 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 20 Sep 2021 22:50:48 +0000 Subject: [PATCH 2/3] Fixing style errors. --- htdocs/main.inc.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 7efaf0d02ca..952b1eb8547 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1042,17 +1042,16 @@ if (!defined('NOLOGIN')) { //Required if advanced permissions are used with MAIN_USE_ADVANCED_PERMS if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - - if (empty($user->rights->user->user_advance)) { - $user->rights->user->user_advance = new stdClass(); // To avoid warnings - } - if (empty($user->rights->user->user_advance)) { - $user->rights->user->self_advance = new stdClass(); // To avoid warnings - } - if (empty($user->rights->user->user_advance)) { - $user->rights->user->group_advance = new stdClass(); // To avoid warnings - } - + if (empty($user->rights->user->user_advance)) { + $user->rights->user->user_advance = new stdClass(); // To avoid warnings + } + if (empty($user->rights->user->user_advance)) { + $user->rights->user->self_advance = new stdClass(); // To avoid warnings + } + if (empty($user->rights->user->user_advance)) { + $user->rights->user->group_advance = new stdClass(); // To avoid warnings + } + $user->rights->user->user_advance->readperms = 1; $user->rights->user->user_advance->write = 1; $user->rights->user->self_advance->readperms = 1; From 278ae34b5f38317959906d24f8432abb09ca1f54 Mon Sep 17 00:00:00 2001 From: javieralapps4up Date: Tue, 21 Sep 2021 00:53:10 +0200 Subject: [PATCH 3/3] Update main.inc.php --- htdocs/main.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 952b1eb8547..336e067c222 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1045,10 +1045,10 @@ if (!defined('NOLOGIN')) { if (empty($user->rights->user->user_advance)) { $user->rights->user->user_advance = new stdClass(); // To avoid warnings } - if (empty($user->rights->user->user_advance)) { + if (empty($user->rights->user->self_advance)) { $user->rights->user->self_advance = new stdClass(); // To avoid warnings } - if (empty($user->rights->user->user_advance)) { + if (empty($user->rights->user->group_advance)) { $user->rights->user->group_advance = new stdClass(); // To avoid warnings }