From a48ea08a1f3bfa8fb8d70bda2911c7cad3d6ca5d Mon Sep 17 00:00:00 2001 From: "glix08@gmail.com" Date: Fri, 17 Jan 2014 13:58:06 +0000 Subject: [PATCH] r560 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Проверка на остаточные записи об уже удаленных топиках git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@560 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293 --- upload/config.php | 2 +- upload/includes/functions_admin.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/upload/config.php b/upload/config.php index 336265996..2f4263829 100644 --- a/upload/config.php +++ b/upload/config.php @@ -56,7 +56,7 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do // Increase number of revision after update $bb_cfg['tp_version'] = '2.5 (unstable)'; $bb_cfg['tp_release_date'] = '17-01-2014'; -$bb_cfg['tp_release_state'] = 'R559'; +$bb_cfg['tp_release_state'] = 'R560'; // Database $charset = 'utf8'; diff --git a/upload/includes/functions_admin.php b/upload/includes/functions_admin.php index 8507356f4..8e0526d6b 100644 --- a/upload/includes/functions_admin.php +++ b/upload/includes/functions_admin.php @@ -6,7 +6,7 @@ function sync ($type, $id) { switch ($type) { - case 'forum': + case 'forum': $all_forums = ($id === 'all'); @@ -66,6 +66,9 @@ function sync ($type, $id) break; } + // Проверка на остаточные записи об уже удаленных топиках + DB()->query("DELETE FROM ". BB_TOPICS ." WHERE topic_first_post_id NOT IN (SELECT post_id FROM ". BB_POSTS .")"); + $tmp_sync_topics = 'tmp_sync_topics'; DB()->query("