aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-04-09 21:20:24 +0000
committerNils Adermann <naderman@naderman.de>2006-04-09 21:20:24 +0000
commitfc394d6302b45ff61d8c55e3e9516f3c212bf04c (patch)
tree4be365327698f094cb78f0a3825a19498d954843 /phpBB/includes/mcp
parent5b24c3a7fb5eaef0c6a1374eff1435322097f0b9 (diff)
downloadforums-fc394d6302b45ff61d8c55e3e9516f3c212bf04c.tar
forums-fc394d6302b45ff61d8c55e3e9516f3c212bf04c.tar.gz
forums-fc394d6302b45ff61d8c55e3e9516f3c212bf04c.tar.bz2
forums-fc394d6302b45ff61d8c55e3e9516f3c212bf04c.tar.xz
forums-fc394d6302b45ff61d8c55e3e9516f3c212bf04c.zip
- check m_ permission for quickmod [Bug #1317]
- don't sync the global forum (id 0) [Bug #1383] - corrections to available time zones [Bug #1306] - only display open reports on mcp_front - added whois information to mcp_post [Bug #1400] - copy "dot" when copying a topic [Bug #1321] - some language corrections [Bugs #1324, #1255, #1317] - mozWrap scrolls back to previous position now [Bug #1190] - some style related corrections [Bugs #1322, #1454, #1316] - corrected copyrights [Bug #1468] - fixed links on search results page [Bug #1469] git-svn-id: file:///svn/phpbb/trunk@5779 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp')
-rw-r--r--phpBB/includes/mcp/mcp_front.php2
-rw-r--r--phpBB/includes/mcp/mcp_main.php12
-rw-r--r--phpBB/includes/mcp/mcp_post.php18
3 files changed, 30 insertions, 2 deletions
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index 67f0885caf..653af87a45 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -115,6 +115,7 @@ function mcp_front_view($id, $mode, $action)
$sql = 'SELECT COUNT(r.report_id) AS total
FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p
WHERE r.post_id = p.post_id
+ AND r.report_closed = 0
AND p.forum_id IN (0, ' . implode(', ', $forum_list) . ')';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
@@ -126,6 +127,7 @@ function mcp_front_view($id, $mode, $action)
FROM (' . REPORTS_TABLE . ' r, ' . REASONS_TABLE . ' rr,' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u)
LEFT JOIN ' . FORUMS_TABLE . ' f ON (f.forum_id = p.forum_id)
WHERE r.post_id = p.post_id
+ AND r.report_closed = 0
AND r.reason_id = rr.reason_id
AND p.topic_id = t.topic_id
AND r.user_id = u.user_id
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 9513bc96f8..5b7433a6a3 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -170,7 +170,14 @@ class mcp_main
mcp_post_details($id, $mode, $action);
- $this->tpl_name = 'mcp_post';
+ if ($action == 'whois')
+ {
+ $this->tpl_name = 'mcp_whois';
+ }
+ else
+ {
+ $this->tpl_name = 'mcp_post';
+ }
break;
default:
@@ -868,6 +875,9 @@ function mcp_fork_topic($topic_ids)
$db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$new_post_id = $db->sql_nextid();
+ // Copy whether the topic is dotted
+ markread('post', $to_forum_id, $new_topic_id, 0, $row['poster_id']);
+
// Copy Attachments
if ($row['post_attachment'])
{
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index 5dfb5947f9..3880f036a8 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -34,6 +34,22 @@ function mcp_post_details($id, $mode, $action)
switch ($action)
{
+ case 'whois':
+ $ip = request_var('ip', '');
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $whois = user_ipwhois($ip);
+
+ $whois = preg_replace('#(\s)([\w\-\._\+]+@[\w\-\.]+)(\s)#', '\1<a href="mailto:\2">\2</a>\3', $whois);
+ $whois = preg_replace('#(\s)(http:/{2}[^\s]*)(\s)#', '\1<a href="\2" target="_blank">\2</a>\3', $whois);
+
+ $template->assign_vars(array(
+ 'RETURN_POST' => sprintf($user->lang['RETURN_POST'], "<a href=\"{$phpbb_root_path}mcp.$phpEx$SID&amp;i=$id&amp;mode=$mode&amp;p=$post_id\">", '</a>'),
+ 'WHOIS' => trim($whois))
+ );
+ // We're done with the whois page so return
+ return;
+
case 'chgposter':
$username = request_var('username', '');
@@ -249,7 +265,7 @@ function mcp_post_details($id, $mode, $action)
'L_POST_S' => ($row['postings'] == 1) ? $user->lang['POST'] : $user->lang['POSTS'],
'U_LOOKUP_IP' => ($rdns_ip_num == $row['poster_ip'] || $rdns_ip_num == 'all') ? '' : "$url&amp;i=$id&amp;mode=post_details&amp;rdns={$row['poster_ip']}#ip",
- 'U_WHOIS' => "{$phpbb_root_path}mcp.$phpEx$SID&amp;i=$id&amp;mode=whois&amp;ip={$row['poster_ip']}")
+ 'U_WHOIS' => "{$phpbb_root_path}mcp.$phpEx$SID&amp;i=$id&amp;mode=$mode&amp;action=whois&amp;p=$post_id&amp;ip={$row['poster_ip']}")
);
}
$db->sql_freeresult($result);