From 3da86bb615795653db2b57704c8104663a59585d Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Wed, 22 Feb 2006 11:39:27 +0000 Subject: - properly hide items git-svn-id: file:///svn/phpbb/trunk@5570 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_module.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/functions_module.php') diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index 031c6405de..6e8fc7b2c8 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -581,14 +581,13 @@ class p_master /** * Toggle whether this module will be displayed or not */ - function set_display($id, $display = true) + function set_display($id, $mode = false, $display = true) { foreach ($this->module_ary as $row_id => $itep_ary) { - if ($itep_ary['name'] === $id || $itep_ary['id'] === (int) $id) + if (($itep_ary['name'] === $id || $itep_ary['id'] === (int) $id) && (!$mode || $itep_ary['mode'] === $mode)) { $this->module_ary[$row_id]['display'] = (int) $display; - break; } } } -- cgit v1.2.1