aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/mcp.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/mcp.php')
-rw-r--r--phpBB/mcp.php41
1 files changed, 38 insertions, 3 deletions
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index ce87fd4ae0..1577c32de8 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -227,9 +227,9 @@ $module->assign_tpl_vars(append_sid("{$phpbb_root_path}mcp.$phpEx"));
// Generate urls for letting the moderation control panel being accessed in different modes
$template->assign_vars(array(
'U_MCP' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main'),
- 'U_MCP_FORUM' => ($forum_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=forum_view&f=$forum_id") : '',
- 'U_MCP_TOPIC' => ($forum_id && $topic_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=topic_view&t=$topic_id") : '',
- 'U_MCP_POST' => ($forum_id && $topic_id && $post_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=post_details&t=$topic_id&p=$post_id") : '',
+ 'U_MCP_FORUM' => ($forum_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=forum_view&f=$forum_id") : '',
+ 'U_MCP_TOPIC' => ($forum_id && $topic_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=topic_view&t=$topic_id") : '',
+ 'U_MCP_POST' => ($forum_id && $topic_id && $post_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=post_details&t=$topic_id&p=$post_id") : '',
));
// Generate the page, do not display/query online list
@@ -243,6 +243,41 @@ function _module__url($mode, &$module_row)
return extra_url();
}
+function _module_notes_url($mode, &$module_row)
+{
+ if ($mode == 'front')
+ {
+ return '';
+ }
+
+ global $user_id;
+ return ($user_id) ? "&u=$user_id" : '';
+}
+
+function _module_warn_url($mode, &$module_row)
+{
+ if ($mode == 'front' || $mode == 'list')
+ {
+ return '';
+ }
+
+ if ($mode == 'warn_post')
+ {
+ global $forum_id, $post_id;
+
+ $url_extra = ($forum_id) ? "&f=$forum_id" : '';
+ $url_extra .= ($post_id) ? "&p=$post_id" : '';
+
+ return $url_extra;
+ }
+ else
+ {
+ global $user_id;
+
+ return ($user_id) ? "&u=$user_id" : '';
+ }
+}
+
function _module_main_url($mode, &$module_row)
{
return extra_url();