1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-10-17 09:46:25 +02:00

Merge most changes from 3.0.x branch since the 25th december.

(Captcha changes for refreshing captcha image not included)

git-svn-id: file:///svn/phpbb/trunk@9404 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2009-03-22 16:34:26 +00:00
parent fac9c024ff
commit 4cbf6bc703
80 changed files with 2491 additions and 916 deletions

View File

@@ -909,6 +909,11 @@ function mcp_delete_post($post_ids)
}
else
{
if ($affected_topics != 1 || $deleted_topics || !$topic_id)
{
$redirect = append_sid('mcp', "f=$forum_id&i=main&mode=forum_view", false);
}
meta_refresh(3, $redirect);
trigger_error($success_msg . '<br /><br />' . sprintf(phpbb::$user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>') . '<br /><br />' . implode('<br /><br />', $return_link));
}
@@ -1160,8 +1165,8 @@ function mcp_fork_topic($topic_ids)
}
sync('forum', 'forum_id', $to_forum_id);
set_config('num_topics', phpbb::$config['num_topics'] + sizeof($new_topic_id_list), true);
set_config('num_posts', phpbb::$config['num_posts'] + $total_posts, true);
set_config_count('num_topics', sizeof($new_topic_id_list), true);
set_config_count('num_posts', $total_posts, true);
foreach ($new_topic_id_list as $topic_id => $new_topic_id)
{

View File

@@ -220,13 +220,16 @@ class mcp_notes
'PAGINATION' => generate_pagination($this->u_action . "&amp;st=$st&amp;sk=$sk&amp;sd=$sd", $log_count, phpbb::$config['posts_per_page'], $start),
'TOTAL_REPORTS' => ($log_count == 1) ? phpbb::$user->lang['LIST_REPORT'] : sprintf(phpbb::$user->lang['LIST_REPORTS'], $log_count),
'USERNAME' => $userrow['username'],
'USER_COLOR' => (!empty($userrow['user_colour'])) ? $userrow['user_colour'] : '',
'RANK_TITLE' => $rank_title,
'JOINED' => phpbb::$user->format_date($userrow['user_regdate']),
'POSTS' => ($userrow['user_posts']) ? $userrow['user_posts'] : 0,
'WARNINGS' => ($userrow['user_warnings']) ? $userrow['user_warnings'] : 0,
'USERNAME_FULL' => get_username_string('full', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
'USERNAME_COLOUR' => get_username_string('colour', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
'USERNAME' => get_username_string('username', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
'U_PROFILE' => get_username_string('profile', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
'AVATAR_IMG' => $avatar_img,
'RANK_IMG' => $rank_img,
));

View File

@@ -488,12 +488,18 @@ function approve_post($post_id_list, $id, $mode)
$total_topics = $total_posts = 0;
$forum_topics_posts = $topic_approve_sql = $topic_replies_sql = $post_approve_sql = $topic_id_list = $forum_id_list = $approve_log = array();
$user_posts_sql = array();
$user_posts_sql = $post_approved_list = array();
$update_forum_information = false;
foreach ($post_info as $post_id => $post_data)
{
if ($post_data['post_approved'])
{
$post_approved_list[] = $post_id;
continue;
}
$topic_id_list[$post_data['topic_id']] = 1;
if ($post_data['forum_id'])
@@ -579,6 +585,11 @@ function approve_post($post_id_list, $id, $mode)
$update_forum_information = true;
}
}
$post_id_list = array_values(array_diff($post_id_list, $post_approved_list));
for ($i = 0, $size = sizeof($post_approved_list); $i < $size; $i++)
{
unset($post_info[$post_approved_list[$i]]);
}
if (sizeof($topic_approve_sql))
{
@@ -648,12 +659,12 @@ function approve_post($post_id_list, $id, $mode)
if ($total_topics)
{
set_config('num_topics', phpbb::$config['num_topics'] + $total_topics, true);
set_config_count('num_topics', $total_topics, true);
}
if ($total_posts)
{
set_config('num_posts', phpbb::$config['num_posts'] + $total_posts, true);
set_config_count('num_posts', $total_posts, true);
}
unset($topic_approve_sql, $topic_replies_sql, $post_approve_sql);
@@ -729,7 +740,7 @@ function approve_post($post_id_list, $id, $mode)
}
else
{
$success_msg = (sizeof($post_id_list) == 1) ? 'POST_APPROVED_SUCCESS' : 'POSTS_APPROVED_SUCCESS';
$success_msg = (sizeof($post_id_list) + sizeof($post_approved_list) == 1) ? 'POST_APPROVED_SUCCESS' : 'POSTS_APPROVED_SUCCESS';
}
}
else

View File

@@ -496,7 +496,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$success_msg = 'TOPIC_SPLIT_SUCCESS';
// Update forum statistics
set_config('num_topics', phpbb::$config['num_topics'] + 1, true);
set_config_count('num_topics', 1, true);
// Link back to both topics
$return_link = sprintf(phpbb::$user->lang['RETURN_TOPIC'], '<a href="' . append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf(phpbb::$user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid('viewtopic', 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');

View File

@@ -407,13 +407,16 @@ class mcp_warn
phpbb::$template->assign_vars(array(
'U_POST_ACTION' => $this->u_action,
'USERNAME' => $user_row['username'],
'USER_COLOR' => (!empty($user_row['user_colour'])) ? $user_row['user_colour'] : '',
'RANK_TITLE' => $rank_title,
'JOINED' => phpbb::$user->format_date($user_row['user_regdate']),
'POSTS' => ($user_row['user_posts']) ? $user_row['user_posts'] : 0,
'WARNINGS' => ($user_row['user_warnings']) ? $user_row['user_warnings'] : 0,
'USERNAME_FULL' => get_username_string('full', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
'USERNAME_COLOUR' => get_username_string('colour', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
'USERNAME' => get_username_string('username', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
'U_PROFILE' => get_username_string('profile', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
'AVATAR_IMG' => $avatar_img,
'RANK_IMG' => $rank_img,