aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_reports.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-07-07 12:36:44 +0000
committerNils Adermann <naderman@naderman.de>2006-07-07 12:36:44 +0000
commita5c23243c7a0a86ccd749b7733b11d30a6c349e1 (patch)
treef7cd509c0db4efb62f212e483ba5a83bff0d457d /phpBB/includes/mcp/mcp_reports.php
parent8c128de642207142bf599fcf9d78c2b0e705e351 (diff)
downloadforums-a5c23243c7a0a86ccd749b7733b11d30a6c349e1.tar
forums-a5c23243c7a0a86ccd749b7733b11d30a6c349e1.tar.gz
forums-a5c23243c7a0a86ccd749b7733b11d30a6c349e1.tar.bz2
forums-a5c23243c7a0a86ccd749b7733b11d30a6c349e1.tar.xz
forums-a5c23243c7a0a86ccd749b7733b11d30a6c349e1.zip
- display age in user profile and make it available on viewtopic
- various tiny bugfixes including [Bug #2351] [Bug #2549] [Bug #2681] [Bug #3015] - strip first, then change newlines [Bug #2403] - added support for creating user profiles to the login function (makes use of user_add), triggered by LOGIN_SUCCESS_CREATE_PROFILE constant - moved newest user updating from ucp_register to user_add function - renamed the admin_ auth module function to acp_ - added initialisation code to auth_apache which checks whether it will work - added user_add support to both auth_ldap and auth_apache - some auth_ldap tweaks, should work with users deeper in the organisation structure too now - adjusted global topics in mcp_report to work like mcp_queue git-svn-id: file:///svn/phpbb/trunk@6151 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp/mcp_reports.php')
-rwxr-xr-xphpBB/includes/mcp/mcp_reports.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 6ff8545acc..9bafa6ffeb 100755
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -191,6 +191,8 @@ class mcp_reports
$forum_list[] = $row['forum_id'];
}
+ $global_id = $forum_list[0];
+
if (!($forum_list = implode(', ', $forum_list)))
{
trigger_error('NOT_MODERATOR');
@@ -214,6 +216,7 @@ class mcp_reports
$forum_info = $forum_info[$forum_id];
$forum_list = $forum_id;
+ $global_id = $forum_id;
}
$forum_list .= ', 0';
@@ -297,16 +300,20 @@ class mcp_reports
$poster = $row['username'];
}
+ $global_topic = ($row['forum_id']) ? false : true;
+ if ($global_topic)
+ {
+ $row['forum_id'] = $global_id;
+ }
+
$template->assign_block_vars('postrow', array(
- 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
- // Q: Why accessing the topic by a post_id instead of its topic_id?
- // A: To prevent the post from being hidden because of wrong encoding or different charset
- 'U_VIEWTOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']) . '#p' . $row['post_id'],
- 'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&amp;start=$start&amp;mode=report_details&amp;f={$forum_id}&amp;p={$row['post_id']}"),
+ 'U_VIEWFORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '',
+ 'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']) . '#p' . $row['post_id'],
+ 'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&amp;start=$start&amp;mode=report_details&amp;f={$row['forum_id']}&amp;p={$row['post_id']}"),
'U_VIEW_POSTER_PROFILE' => ($row['poster_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['poster_id']) : '',
'U_VIEW_REPORTER_PROFILE' => ($row['reporter_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['reporter_id']) : '',
- 'FORUM_NAME' => ($row['forum_id']) ? $forum_data[$row['forum_id']]['forum_name'] : $user->lang['ALL_FORUMS'],
+ 'FORUM_NAME' => (!$global_topic) ? $forum_names[$row['forum_id']] : $user->lang['GLOBAL_ANNOUNCEMENT'],
'POSTER' => $poster,
'POST_ID' => $row['post_id'],
'POST_SUBJECT' => $row['post_subject'],