1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

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
This commit is contained in:
Meik Sievertsen
2007-01-22 17:05:23 +00:00
parent 41d0347eb4
commit 60d817416b
7 changed files with 262 additions and 191 deletions

View File

@@ -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&mode=forum_logs&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&mode=forum_logs&f=' . $forum_id) : '',
'S_MCP_ACTION' => $url . "&i=$id&mode=$mode&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&f=$forum_id&topic_id_list[]={$row['topic_id']}&mode=forum_view&action=delete_topic") : '',
'S_MOVED_TOPIC' => true,
'TOPIC_ID' => $row['topic_moved_id'],
));