aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_privmsgs.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-09-26 19:59:41 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-09-26 19:59:41 +0000
commit734492958eaa2f193db304fd5d4cf050390eff1a (patch)
tree37f19f2dd765fd45024bcd9180e729b79c9a430a /phpBB/includes/functions_privmsgs.php
parente339c36ec035520ce6f3ae4c8ad69bff35eabde6 (diff)
downloadforums-734492958eaa2f193db304fd5d4cf050390eff1a.tar
forums-734492958eaa2f193db304fd5d4cf050390eff1a.tar.gz
forums-734492958eaa2f193db304fd5d4cf050390eff1a.tar.bz2
forums-734492958eaa2f193db304fd5d4cf050390eff1a.tar.xz
forums-734492958eaa2f193db304fd5d4cf050390eff1a.zip
These changes should let olympus scale a little bit better.
i haven't adjusted the schemas but added the details to create_schema_files - david is able to build them then in line with his changes. :) git-svn-id: file:///svn/phpbb/trunk@6411 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_privmsgs.php')
-rw-r--r--phpBB/includes/functions_privmsgs.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 1f53dc4511..a28a290a7b 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -611,13 +611,12 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
}
else if ($full_folder_action == FULL_FOLDER_DELETE)
{
- // Delete some messages ;)
- $sql = 'SELECT t.msg_id
- FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . " p
- WHERE t.msg_id = p.msg_id
- AND t.user_id = $user_id
- AND t.folder_id = $dest_folder
- ORDER BY p.message_time ASC";
+ // Delete some messages. NOTE: Ordered by msg_id here instead of message_time!
+ $sql = 'SELECT msg_id
+ FROM ' . PRIVMSGS_TO_TABLE . "
+ WHERE user_id = $user_id
+ AND folder_id = $dest_folder
+ ORDER BY msg_id ASC";
$result = $db->sql_query_limit($sql, (($folder[$dest_folder] + sizeof($msg_ary)) - $user->data['message_limit']));
$delete_ids = array();