mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 08:17:47 +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:
@@ -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
|
||||
|
Reference in New Issue
Block a user