aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-06-09 08:31:32 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-06-09 08:31:32 +0000
commitcbf7b00cb801bc7cbed5735452fc680c85cd9669 (patch)
treef59320c63f7e3a83c992d4a58e6869eee6c21c56 /phpBB/includes
parent5d90161ba45a7b6db593c2a1a1d4371b6b9af658 (diff)
downloadforums-cbf7b00cb801bc7cbed5735452fc680c85cd9669.tar
forums-cbf7b00cb801bc7cbed5735452fc680c85cd9669.tar.gz
forums-cbf7b00cb801bc7cbed5735452fc680c85cd9669.tar.bz2
forums-cbf7b00cb801bc7cbed5735452fc680c85cd9669.tar.xz
forums-cbf7b00cb801bc7cbed5735452fc680c85cd9669.zip
fixing bug #12283 which is a fix for the fix in #12135
- hopefully now working for both... git-svn-id: file:///svn/phpbb/trunk@7735 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_privmsgs.php21
1 files changed, 10 insertions, 11 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 00620bbfb7..37d5087abd 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -498,12 +498,13 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
// We place actions into arrays, to save queries.
$num_new = $num_unread = 0;
- $sql = $unread_ids = $delete_ids = $important_ids = $move_into_folder = array();
+ $sql = $unread_ids = $delete_ids = $important_ids = array();
foreach ($action_ary as $msg_id => $msg_ary)
{
// It is allowed to execute actions more than once, except placing messages into folder
$folder_action = false;
+ $message_removed = false;
foreach ($msg_ary as $pos => $rule_ary)
{
@@ -526,15 +527,11 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
{
$unread_ids[] = $msg_id;
}
-
- if (!$folder_action)
- {
- $move_into_folder[PRIVMSGS_INBOX][] = $msg_id;
- }
break;
case ACTION_DELETE_MESSAGE:
$delete_ids[] = $msg_id;
+ $message_removed = true;
break;
case ACTION_MARK_AS_IMPORTANT:
@@ -542,14 +539,16 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
{
$important_ids[] = $msg_id;
}
-
- if (!$folder_action)
- {
- $move_into_folder[PRIVMSGS_INBOX][] = $msg_id;
- }
break;
}
}
+
+ // We place this here because it could happen that the messages are doubled if a rule marks a message and then moves it into a specific
+ // folder. Here we simply move the message into the INBOX if it gets not removed and also not put into a custom folder.
+ if (!$folder_action && !$message_removed)
+ {
+ $move_into_folder[PRIVMSGS_INBOX][] = $msg_id;
+ }
}
// $num_new += sizeof(array_unique($delete_ids));