aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-05-08 19:48:00 +0200
committerTristan Darricau <github@nicofuma.fr>2014-05-08 19:48:00 +0200
commit51c93aeb025a11930611a792b364502824314e03 (patch)
tree6f4217e26b515bdd5d3feda2515a36934376ccb4 /phpBB/phpbb
parent112e55e8ab6909f5d6fee0b566aba834c9db0c51 (diff)
downloadforums-51c93aeb025a11930611a792b364502824314e03.tar
forums-51c93aeb025a11930611a792b364502824314e03.tar.gz
forums-51c93aeb025a11930611a792b364502824314e03.tar.bz2
forums-51c93aeb025a11930611a792b364502824314e03.tar.xz
forums-51c93aeb025a11930611a792b364502824314e03.zip
[ticket/12174] Revert the changes on $topic_update_array
PHPBB3-12174
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/content_visibility.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php
index ff28f2a7d6..420a43ec98 100644
--- a/phpBB/phpbb/content_visibility.php
+++ b/phpBB/phpbb/content_visibility.php
@@ -426,7 +426,7 @@ class content_visibility
foreach ($sql_ary as $field => $value_change)
{
- $topic_update_array['topic_' . $field] = 'topic_' . $field . $value_change;
+ $topic_update_array[] = 'topic_' . $field . ' = topic_' . $field . $value_change;
$forum_sql[] = 'forum_' . $field . ' = forum_' . $field . $value_change;
}
@@ -453,12 +453,12 @@ class content_visibility
if ($row['nb_attachments'] == 0)
{
$update_topic_attachments_flag = true;
- $topic_update_array['topic_attachment'] = 0;
+ $topic_update_array[] = 'topic_attachment = 0';
}
else if ($visibility == ITEM_APPROVED)
{
$update_topic_attachments_flag = true;
- $topic_update_array['topic_attachment'] = 1;
+ $topic_update_array[] = 'topic_attachment = 1';
}
}
$this->db->sql_freeresult($result);
@@ -468,7 +468,7 @@ class content_visibility
{
// Update the number for replies and posts, and update the attachments flag
$sql = 'UPDATE ' . $this->topics_table . '
- SET ' . $this->db->sql_build_array('UPDATE', $topic_update_array) . '
+ SET ' . implode(', ', $topic_update_array) . '
WHERE topic_id = ' . (int) $topic_id;
$this->db->sql_query($sql);
}