From 7d5128db80a78bed026001e9698d28b634fadd0c Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 6 Jun 2015 15:46:16 +0200 Subject: [PATCH] [ticket/571] Improve docblocks and simplify check in controller helper B3P-571 --- controller/helper.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/controller/helper.php b/controller/helper.php index a2ba9bc0..25164acb 100644 --- a/controller/helper.php +++ b/controller/helper.php @@ -114,7 +114,7 @@ class helper */ protected function check_permission() { - if (!isset($this->config['board3_enable']) || !$this->config['board3_enable'] || !$this->auth->acl_get('u_view_portal')) + if (empty($this->config['board3_enable']) || !$this->auth->acl_get('u_view_portal')) { redirect(append_sid($this->phpbb_root_path . 'index' . $this->php_ext)); } @@ -173,7 +173,9 @@ class helper } /** - * Check if user is in required groups + * Check if user is in required groups. + * If the group_ary is empty, this means that there are no limitation on + * which groups can see this module. * * @param array $row Module row *