aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/content_visibility.php6
-rw-r--r--phpBB/includes/functions_posting.php2
2 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/content_visibility.php b/phpBB/includes/content_visibility.php
index 7761587c53..dcb7f363f8 100644
--- a/phpBB/includes/content_visibility.php
+++ b/phpBB/includes/content_visibility.php
@@ -311,6 +311,12 @@ class phpbb_content_visibility
}
else if ($is_starter && $topic_id)
{
+ if (!function_exists('sync'))
+ {
+ global $phpEx, $phpbb_root_path;
+ include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
+
// ... so we need to use sync, if the first post is changed.
// The forum is resynced recursive by sync() itself.
sync('topic', 'topic_id', $topic_id, true);
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 250d20b005..6d74c6b2d7 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1481,7 +1481,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
$db->sql_transaction('commit');
// Collect the necessary information for updating the tables
- $sql_data[FORUMS_TABLE] = '';
+ $sql_data[FORUMS_TABLE] = $sql_data[TOPICS_TABLE] = '';
switch ($post_mode)
{
case 'delete_topic':