mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-04 15:57:45 +02:00
- Pruning doesn't lower user post counts anymore [Bug #7676]
- Better resync explanations in ACP - relative link to board shouldn't result in an empty link [Bug #7762] - allow spaces to define multiple classes [Bug #7700] - forgot addslashes for password conversion [Bug #7530] - adjusted get_post_data call in mcp_post to retrieve read tracking info [Bug #7538] - fixed sorting in reports/queue by properly generating the pagination links [Bug #7666] - send UTF-8 charset header in database_update.php [Bug #7564] git-svn-id: file:///svn/phpbb/trunk@6974 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -495,7 +495,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
|
||||
/**
|
||||
* Remove topic(s)
|
||||
*/
|
||||
function delete_topics($where_type, $where_ids, $auto_sync = true)
|
||||
function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_sync = true)
|
||||
{
|
||||
global $db, $config;
|
||||
|
||||
@@ -517,7 +517,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true)
|
||||
}
|
||||
|
||||
$return = array(
|
||||
'posts' => delete_posts($where_type, $where_ids, false, true)
|
||||
'posts' => delete_posts($where_type, $where_ids, false, true, $post_count_sync)
|
||||
);
|
||||
|
||||
$sql = 'SELECT topic_id, forum_id, topic_approved
|
||||
@@ -579,7 +579,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true)
|
||||
/**
|
||||
* Remove post(s)
|
||||
*/
|
||||
function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = true)
|
||||
function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = true, $post_count_sync = true)
|
||||
{
|
||||
global $db, $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
@@ -612,7 +612,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
$topic_ids[] = $row['topic_id'];
|
||||
$forum_ids[] = $row['forum_id'];
|
||||
|
||||
if ($row['post_postcount'])
|
||||
if ($row['post_postcount'] && $post_count_sync)
|
||||
{
|
||||
$post_counts[$row['poster_id']] = (!empty($post_counts[$row['poster_id']])) ? $post_counts[$row['poster_id']] + 1 : 1;
|
||||
}
|
||||
@@ -642,7 +642,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
unset($table_ary);
|
||||
|
||||
// Adjust users post counts
|
||||
if (sizeof($post_counts))
|
||||
if (sizeof($post_counts) && $post_count_sync)
|
||||
{
|
||||
foreach ($post_counts as $poster_id => $substract)
|
||||
{
|
||||
@@ -1896,7 +1896,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
|
||||
$topic_list = array_unique($topic_list);
|
||||
}
|
||||
|
||||
return delete_topics('topic_id', $topic_list, $auto_sync);
|
||||
return delete_topics('topic_id', $topic_list, $auto_sync, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user