1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[feature/soft-delete] Fix restoring a post via editing

PHPBB3-9567
This commit is contained in:
Joas Schilling
2012-10-08 23:09:12 +02:00
parent 53e01bba19
commit e447a0fa07
3 changed files with 18 additions and 50 deletions

View File

@@ -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);

View File

@@ -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':