Author: Mighty Gorgon
(2009/12/12 11:19) About 2 years ago
Fixed (hopefully) a small bug in PM
381
382
if ($sent_info = $db->sql_fetchrow($result))
383
{
384
if ($config['max_sentbox_privmsgs'] && $sent_info['sent_items'] >= $config['max_sentbox_privmsgs'])
if ($config['max_sentbox_privmsgs'] && ($sent_info['sent_items'] >= $config['max_sentbox_privmsgs']))
385
386
$sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . "
387
WHERE privmsgs_type = " . PRIVMSGS_SENT_MAIL . "
...
391
$old_privmsgs_id = $db->sql_fetchrow($result);
392
$old_privmsgs_id = $old_privmsgs_id['privmsgs_id'];
393
394
$sql = "DELETE FROM " . PRIVMSGS_TABLE . "
if (!empty($old_privmsgs_id))
395
WHERE privmsgs_id = $old_privmsgs_id";
396
$result = $db->sql_query($sql);
397
WHERE privmsgs_id = " . $old_privmsgs_id;
398
399
}
400
401
402
{{if ($config['max_sentbox_privmsgs'] && $sent_info['sent_items'] >= $config['max_sentbox_privmsgs'])if ($config['max_sentbox_privmsgs'] && ($sent_info['sent_items'] >= $config['max_sentbox_privmsgs'])){{$sql = "DELETE FROM " . PRIVMSGS_TABLE . "if (!empty($old_privmsgs_id))WHERE privmsgs_id = $old_privmsgs_id";{$result = $db->sql_query($sql);$sql = "DELETE FROM " . PRIVMSGS_TABLE . "WHERE privmsgs_id = " . $old_privmsgs_id;$result = $db->sql_query($sql);}