mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-18 07:31:32 +02:00
- 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
This commit is contained in:
@@ -1057,7 +1057,7 @@ class acp_users
|
||||
$var_ary = array(
|
||||
'dateformat' => array('string', false, 3, 30),
|
||||
'lang' => array('match', false, '#^[a-z_]{2,}$#i'),
|
||||
'tz' => array('num', false, -13, 13),
|
||||
'tz' => array('num', false, -14, 14),
|
||||
|
||||
'topic_sk' => array('string', false, 1, 1),
|
||||
'topic_sd' => array('string', false, 1, 1),
|
||||
|
@@ -544,8 +544,10 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
|
||||
/**
|
||||
* Marks a topic/forum as read
|
||||
* Marks a topic as posted to
|
||||
*
|
||||
* @param int $user_id can only be used with $mode == 'post'
|
||||
*/
|
||||
function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0)
|
||||
function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $user_id = 0)
|
||||
{
|
||||
global $db, $user, $config;
|
||||
|
||||
@@ -786,7 +788,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0)
|
||||
$db->sql_return_on_error(true);
|
||||
|
||||
$sql_ary = array(
|
||||
'user_id' => $user->data['user_id'],
|
||||
'user_id' => (!$user_id) ? $user->data['user_id'] : $user_id,
|
||||
'topic_id' => $topic_id,
|
||||
'topic_posted' => 1
|
||||
);
|
||||
|
@@ -918,11 +918,15 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
else
|
||||
{
|
||||
// Do not sync the "global forum"
|
||||
$where_ids = array_diff($where_ids, array(0));
|
||||
|
||||
if (!sizeof($where_ids))
|
||||
{
|
||||
// Empty array with IDs. This means that we don't have any work to do. Just return.
|
||||
return;
|
||||
}
|
||||
|
||||
// Limit the topics/forums we are syncing, use specific topic/forum IDs.
|
||||
// $where_type contains the field for the where clause (forum_id, topic_id)
|
||||
$where_sql = 'WHERE ' . $mode{0} . ".$where_type IN (" . implode(', ', $where_ids) . ')';
|
||||
|
@@ -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
|
||||
|
@@ -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'])
|
||||
{
|
||||
|
@@ -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&i=$id&mode=$mode&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&i=$id&mode=post_details&rdns={$row['poster_ip']}#ip",
|
||||
'U_WHOIS' => "{$phpbb_root_path}mcp.$phpEx$SID&i=$id&mode=whois&ip={$row['poster_ip']}")
|
||||
'U_WHOIS' => "{$phpbb_root_path}mcp.$phpEx$SID&i=$id&mode=$mode&action=whois&p=$post_id&ip={$row['poster_ip']}")
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
@@ -52,7 +52,7 @@ class ucp_prefs
|
||||
$var_ary = array(
|
||||
'dateformat' => array('string', false, 3, 30),
|
||||
'lang' => array('match', false, '#^[a-z_]{2,}$#i'),
|
||||
'tz' => array('num', false, -13, 13),
|
||||
'tz' => array('num', false, -14, 14),
|
||||
);
|
||||
|
||||
$error = validate_data($data, $var_ary);
|
||||
|
@@ -122,7 +122,7 @@ class ucp_register
|
||||
array('email')),
|
||||
'email_confirm' => array('string', false, 6, 60),
|
||||
'confirm_code' => array('string', !$config['enable_confirm'], 5, 8),
|
||||
'tz' => array('num', false, -13, 13),
|
||||
'tz' => array('num', false, -14, 14),
|
||||
'lang' => array('match', false, '#^[a-z_]{2,}$#i'),
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user