mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
adjusting sql_freeresult a bit as well as our error handler (it now prints out if it is because of DEBUG_EXTRA being defined - which is not enabled within the betas/rc's and stable releases).
git-svn-id: file:///svn/phpbb/trunk@5699 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -460,9 +460,8 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||
AND folder_id = " . PRIVMSGS_INBOX . "
|
||||
GROUP BY folder_id";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
|
||||
$folder[PRIVMSGS_INBOX] = (int) $db->sql_fetchfield('num_messages', 0, $result);
|
||||
$db->sql_freeresult($result);
|
||||
$folder[PRIVMSGS_INBOX] = (int) $db->sql_fetchfield('num_messages');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -622,7 +621,10 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
|
||||
WHERE folder_id = ' . PRIVMSGS_INBOX . "
|
||||
AND user_id = $user_id";
|
||||
$result = $db->sql_query($sql);
|
||||
if ($db->sql_fetchfield('num_messages', 0, $result) + sizeof($move_msg_ids) > $message_limit)
|
||||
$num_messages = (int) $db->sql_fetchfield('num_messages');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($num_messages + sizeof($move_msg_ids) > $message_limit)
|
||||
{
|
||||
$message = sprintf($user->lang['NOT_ENOUGH_SPACE_FOLDER'], $user->lang['PM_INBOX']) . '<br /><br />';
|
||||
$message .= sprintf($user->lang['CLICK_RETURN_FOLDER'], "<a href=\"{$phpbb_root_path}ucp.$phpEx$SID&i=pm&folder=inbox\">", '</a>', $user->lang['PM_INBOX']);
|
||||
|
Reference in New Issue
Block a user