diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-10-16 10:55:00 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-10-16 10:55:00 +0200 |
commit | fce30d1d91d7e1e4a2c2989640d5c5176e7fada0 (patch) | |
tree | c76d7519ea74c0514bd03837d38de2872fc443b8 | |
parent | 1dd0ceabf6e3cdc49ea6a2abe3ad8fcece4cca31 (diff) | |
download | forums-fce30d1d91d7e1e4a2c2989640d5c5176e7fada0.tar forums-fce30d1d91d7e1e4a2c2989640d5c5176e7fada0.tar.gz forums-fce30d1d91d7e1e4a2c2989640d5c5176e7fada0.tar.bz2 forums-fce30d1d91d7e1e4a2c2989640d5c5176e7fada0.tar.xz forums-fce30d1d91d7e1e4a2c2989640d5c5176e7fada0.zip |
[ticket/14795] Use maximum topic views instead of adding up views in merge
Merging topics should not result in topic views being added up but rather in
the highest topic view showing up for the merged topic.
PHPBB3-14795
-rw-r--r-- | phpBB/includes/mcp/mcp_forum.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index 7df712f65f..5e4dce2de7 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -424,7 +424,7 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id) foreach ($topic_data as $data) { $sync_forums[$data['forum_id']] = $data['forum_id']; - $topic_views += $data['topic_views']; + $topic_views = max($topic_views, $data['topic_views']); } $topic_data = $topic_data[$to_topic_id]; |