From 7ca8a4a6626345fa7444cbbbb36b678e31688258 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 18 Dec 2006 17:29:39 +0000 Subject: - Modules are not added correctly [#6370] - Minor bug in ucp_prefs_personal.html (Opera) [#6348] - MCP-Warnings section colspan problem in Opera [#6338] - Loading extensions on install [#6332] - Adjust PM rules if folder removed [#6326] - #6318 - Coppa registration [#6306] - Quick-Mod Topic Type Changes Fail when Topic == Global [#6228] - added the possibility to change topic type for more than one topic (within mcp) git-svn-id: file:///svn/phpbb/trunk@6781 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/ucp/ucp_pm_options.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'phpBB/includes/ucp/ucp_pm_options.php') diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php index da451b999c..fc1bffa5f5 100644 --- a/phpBB/includes/ucp/ucp_pm_options.php +++ b/phpBB/includes/ucp/ucp_pm_options.php @@ -227,6 +227,14 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit $user->data['user_full_folder'] = PRIVMSGS_INBOX; } + // Now make sure the folder is not used for rules + // We assign another folder id (the one the messages got moved to) or assign the INBOX (to not have to remove any rule) + $sql = 'UPDATE ' . PRIVMSGS_RULES_TABLE . ' SET rule_folder_id = '; + $sql .= ($remove_action == 1) ? $move_to : PRIVMSGS_INBOX; + $sql .= ' WHERE rule_folder_id = ' . $remove_folder_id; + + $db->sql_query($sql); + $meta_info = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=$mode"); $message = $user->lang['FOLDER_REMOVED']; -- cgit v1.2.1