aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_privmsgs.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_privmsgs.php')
-rw-r--r--phpBB/includes/functions_privmsgs.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 5476517440..bffa64158a 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -276,7 +276,7 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
case ACTION_PLACE_INTO_FOLDER:
return array('action' => $rule_row['rule_action'], 'folder_id' => $rule_row['rule_folder_id']);
break;
-
+
case ACTION_MARK_AS_READ:
case ACTION_MARK_AS_IMPORTANT:
return array('action' => $rule_row['rule_action'], 'pm_unread' => $message_row['pm_unread'], 'pm_marked' => $message_row['pm_marked']);
@@ -304,7 +304,7 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
return false;
break;
-
+
default:
return false;
}
@@ -606,7 +606,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
unset($sql_folder);
- if (in_array(PRIVMSGS_INBOX, array_keys($move_into_folder)))
+ if (isset($move_into_folder[PRIVMSGS_INBOX]))
{
$sql = 'SELECT COUNT(msg_id) as num_messages
FROM ' . PRIVMSGS_TO_TABLE . "
@@ -892,7 +892,7 @@ function handle_mark_actions($user_id, $mark_action)
if (confirm_box(true))
{
delete_pm($user_id, $msg_ids, $cur_folder_id);
-
+
$success_msg = (sizeof($msg_ids) == 1) ? 'MESSAGE_DELETED' : 'MESSAGES_DELETED';
$redirect = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=' . $cur_folder_id);
@@ -1034,8 +1034,8 @@ function delete_pm($user_id, $msg_ids, $folder_id)
$user->data['user_new_privmsg'] -= $num_new;
$user->data['user_unread_privmsg'] -= $num_unread;
}
-
- // Now we have to check which messages we can delete completely
+
+ // Now we have to check which messages we can delete completely
$sql = 'SELECT msg_id
FROM ' . PRIVMSGS_TO_TABLE . '
WHERE ' . $db->sql_in_set('msg_id', array_keys($delete_rows));
@@ -1157,7 +1157,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false)
FROM ' . GROUPS_TABLE . '
WHERE ' . $db->sql_in_set('group_id', $g);
$result = $db->sql_query($sql);
-
+
while ($row = $db->sql_fetchrow($result))
{
if ($check_type == 'to' || $author_id == $user->data['user_id'] || $row['user_id'] == $user->data['user_id'])
@@ -1175,7 +1175,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false)
AND g.group_id = ug.group_id
AND ug.user_pending = 0';
$result = $db->sql_query($sql);
-
+
while ($row = $db->sql_fetchrow($result))
{
if (!isset($address['group'][$row['group_id']]))
@@ -1331,7 +1331,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
AND u.user_id = ug.user_id
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
$result = $db->sql_query($sql);
-
+
while ($row = $db->sql_fetchrow($result))
{
$field = ($data['address_list']['g'][$row['group_id']] == 'to') ? 'to' : 'bcc';
@@ -1506,7 +1506,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
foreach ($data['attachment_data'] as $pos => $attach_row)
{
- if ($attach_row['is_orphan'] && !in_array($attach_row['attach_id'], array_keys($orphan_rows)))
+ if ($attach_row['is_orphan'] && !isset($orphan_rows[$attach_row['attach_id']]))
{
continue;
}