aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_privmsgs.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-08-03 15:23:34 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-08-03 15:23:34 +0000
commit82f42bb5fa611e790e02bc679b88ce90b3f8156b (patch)
tree7cb7cf746da4fd979569dc41dcec96db5f5c9acd /phpBB/includes/functions_privmsgs.php
parent650007a5f18e0538b27bf93d674c264fef58c506 (diff)
downloadforums-82f42bb5fa611e790e02bc679b88ce90b3f8156b.tar
forums-82f42bb5fa611e790e02bc679b88ce90b3f8156b.tar.gz
forums-82f42bb5fa611e790e02bc679b88ce90b3f8156b.tar.bz2
forums-82f42bb5fa611e790e02bc679b88ce90b3f8156b.tar.xz
forums-82f42bb5fa611e790e02bc679b88ce90b3f8156b.zip
- custom profile field fixed
- fixing sql_fetchfield from cache - changing the quote parser. In my tests i have not seen changed behaviour - but i might have broken something with this change. git-svn-id: file:///svn/phpbb/trunk@6232 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_privmsgs.php')
-rw-r--r--phpBB/includes/functions_privmsgs.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index dde811c3f3..b41a2f8b8f 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -262,7 +262,7 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
// Replace Rule Literals
$evaluate = preg_replace('/{(STRING|USER_ID|GROUP_ID)}/', '$rule_row["rule_" . strtolower("\1")]', $evaluate);
- // Eval Statement
+ // Evil Statement
$result = false;
eval('$result = (' . $evaluate . ') ? true : false;');
@@ -447,8 +447,10 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
switch ($rule_ary['action'])
{
case ACTION_PLACE_INTO_FOLDER:
+ // Folder actions have precedence, so we will remove any other ones
$folder_action = true;
$_folder_id = (int) $rule_ary['folder_id'];
+ $move_into_folder = array();
$move_into_folder[$_folder_id][] = $msg_id;
$num_new++;
break;
@@ -458,7 +460,11 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
{
$unread_ids[] = $msg_id;
}
- $move_into_folder[PRIVMSGS_INBOX][] = $msg_id;
+
+ if (!$folder_action)
+ {
+ $move_into_folder[PRIVMSGS_INBOX][] = $msg_id;
+ }
break;
case ACTION_DELETE_MESSAGE:
@@ -470,7 +476,11 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
{
$important_ids[] = $msg_id;
}
- $move_into_folder[PRIVMSGS_INBOX][] = $msg_id;
+
+ if (!$folder_action)
+ {
+ $move_into_folder[PRIVMSGS_INBOX][] = $msg_id;
+ }
break;
}
}