aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_forum.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-01-22 17:05:23 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-01-22 17:05:23 +0000
commit60d817416bd2367e3a234837f559f6e0ffb150c0 (patch)
treea6a650b941f5411a0dad4f878298303771a1387f /phpBB/includes/mcp/mcp_forum.php
parent41d0347eb40594d3d90e30c4fcaf05ee5ad3228a (diff)
downloadforums-60d817416bd2367e3a234837f559f6e0ffb150c0.tar
forums-60d817416bd2367e3a234837f559f6e0ffb150c0.tar.gz
forums-60d817416bd2367e3a234837f559f6e0ffb150c0.tar.bz2
forums-60d817416bd2367e3a234837f559f6e0ffb150c0.tar.xz
forums-60d817416bd2367e3a234837f559f6e0ffb150c0.zip
fixing mcp bugs by introducing a new feature to check for loaded/accessible modules/modes. If the MCP module "logs" get disabled the quick mod tools on viewtopic still show a link to the logs, this will then lead to an error message. This is not fixable. The logs should be accessible to all moderators by default.
git-svn-id: file:///svn/phpbb/trunk@6920 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp/mcp_forum.php')
-rw-r--r--phpBB/includes/mcp/mcp_forum.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php
index 9d0d15b917..4b8961bf38 100644
--- a/phpBB/includes/mcp/mcp_forum.php
+++ b/phpBB/includes/mcp/mcp_forum.php
@@ -13,7 +13,7 @@
*/
function mcp_forum_view($id, $mode, $action, $forum_info)
{
- global $template, $db, $user, $auth, $cache;
+ global $template, $db, $user, $auth, $cache, $module;
global $phpEx, $phpbb_root_path, $config;
$user->add_lang('viewtopic');
@@ -85,7 +85,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
'S_CAN_MAKE_ANNOUNCE' => $auth->acl_get('f_announce', $forum_id),
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
- 'U_VIEW_FORUM_LOGS' => ($auth->acl_gets('a_', 'm_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=logs&amp;mode=forum_logs&amp;f=' . $forum_id) : '',
+ 'U_VIEW_FORUM_LOGS' => ($auth->acl_gets('a_', 'm_', $forum_id) && $module->loaded('logs')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=logs&amp;mode=forum_logs&amp;f=' . $forum_id) : '',
'S_MCP_ACTION' => $url . "&amp;i=$id&amp;mode=$mode&amp;start=$start" . (($action == 'merge_select') ? $selected_ids : ''),
@@ -165,6 +165,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
{
$topic_row = array_merge($topic_row, array(
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_moved_id']}"),
+ 'U_DELETE_TOPIC' => ($auth->acl_get('m_delete', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;f=$forum_id&amp;topic_id_list[]={$row['topic_id']}&amp;mode=forum_view&amp;action=delete_topic") : '',
'S_MOVED_TOPIC' => true,
'TOPIC_ID' => $row['topic_moved_id'],
));