aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-02-22 11:39:27 +0000
committerNils Adermann <naderman@naderman.de>2006-02-22 11:39:27 +0000
commit3da86bb615795653db2b57704c8104663a59585d (patch)
treee20200a48db728fdd2be203c9a359a73519a08e1 /phpBB
parent1a96cc09c1ae16b2e6a888b0c107a37a9bbc91e3 (diff)
downloadforums-3da86bb615795653db2b57704c8104663a59585d.tar
forums-3da86bb615795653db2b57704c8104663a59585d.tar.gz
forums-3da86bb615795653db2b57704c8104663a59585d.tar.bz2
forums-3da86bb615795653db2b57704c8104663a59585d.tar.xz
forums-3da86bb615795653db2b57704c8104663a59585d.zip
- properly hide items
git-svn-id: file:///svn/phpbb/trunk@5570 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_module.php5
-rw-r--r--phpBB/mcp.php23
2 files changed, 11 insertions, 17 deletions
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;
}
}
}
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 2f00a0ab26..f8c10a3709 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -40,12 +40,6 @@ else
$mode = request_var('mode', '');
}
-// Make sure we are using the correct module
-if ($mode == 'approve' || $mode == 'disapprove')
-{
- $id = 'queue';
-}
-
// Only Moderators can go beyond this point
if (!$user->data['is_registered'])
{
@@ -165,23 +159,24 @@ else
// Hide some of the options if we don't have the relevant information to use them
if (!$post_id)
{
- $module->set_display('post_details', false);
- $module->set_display('warn_post', false);
+ $module->set_display('main', 'post_details', false);
+ $module->set_display('queue', 'approve_details', false);
+ $module->set_display('warn', 'warn_post', false);
}
if (!$topic_id)
{
- $module->set_display('topic_view', false);
- $module->set_display('topic_logs', false);
+ $module->set_display('main', 'topic_view', false);
+ $module->set_display('logs', 'topic_logs', false);
}
if (!$forum_id)
{
- $module->set_display('forum_view', false);
- $module->set_display('forum_logs', false);
+ $module->set_display('main', 'forum_view', false);
+ $module->set_display('logs', 'forum_logs', false);
}
if (!$user_id && $username == '')
{
- $module->set_display('user_notes', false);
- $module->set_display('warn_user', false);
+ $module->set_display('notes', 'user_notes', false);
+ $module->set_display('warn', 'warn_user', false);
}
// Load and execute the relevant module