From ee26088b163ccc1f6ba9948e4c4ed818ccce8a9f Mon Sep 17 00:00:00 2001 From: Dark Nightmare Date: Tue, 5 Aug 2014 01:11:03 +0600 Subject: [PATCH] R593 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hot Fix Удаление группы Обнуляйте переменные Signed-off-by: Dark Nightmare --- upload/includes/functions_group.php | 2 ++ upload/posting.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/upload/includes/functions_group.php b/upload/includes/functions_group.php index 026fd065e..bc74edcac 100644 --- a/upload/includes/functions_group.php +++ b/upload/includes/functions_group.php @@ -72,6 +72,8 @@ function delete_group ($group_id) WHERE ug.group_id = $group_id "); + DB()->query("UPDATE ". BB_POSTS . " SET attach_poster_rg_sig = 0, poster_rg_id = 0 WHERE poster_rg_id = ". $group_id); + update_user_level('all'); } diff --git a/upload/posting.php b/upload/posting.php index 57a8bf5dd..b80ac989e 100644 --- a/upload/posting.php +++ b/upload/posting.php @@ -30,6 +30,7 @@ $topic_type = (@$_POST['topictype']) ? (int) $_POST['topictype'] : POST_NORMAL; $topic_type = in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE)) ? $topic_type : POST_NORMAL; $selected_rg = 0; +$switch_poster_rg_sig = 0; if ($mode == 'smilies') { @@ -698,7 +699,7 @@ $template->assign_vars(array( 'MESSAGE' => $message, 'POSTER_RELEASE_GROUPS' => ($poster_release_groups) ? $poster_release_groups : '', - 'ATTACH_POSTER_RG_SIG' => $switch_poster_rg_sig, + 'ATTACH_POSTER_RG_SIG' => ($switch_poster_rg_sig) ? $switch_poster_rg_sig : false, 'U_VIEWTOPIC' => ( $mode == 'reply' ) ? "viewtopic.php?" . POST_TOPIC_URL . "=$topic_id&postorder=desc" : '',