aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_privmsgs.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-08-21 15:09:52 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-08-21 15:09:52 +0000
commitff3843b39e714ef879a91f245ee6170534947503 (patch)
tree21231ba8af0a60ff6f41a533ee749af6a6e82f37 /phpBB/includes/functions_privmsgs.php
parent5f4cd5b65c22a35e8ef3005a9025c2a3f579cfaa (diff)
downloadforums-ff3843b39e714ef879a91f245ee6170534947503.tar
forums-ff3843b39e714ef879a91f245ee6170534947503.tar.gz
forums-ff3843b39e714ef879a91f245ee6170534947503.tar.bz2
forums-ff3843b39e714ef879a91f245ee6170534947503.tar.xz
forums-ff3843b39e714ef879a91f245ee6170534947503.zip
- make sure the copyright/disclaimer is consistent
- two fixes... git-svn-id: file:///svn/phpbb/trunk@8061 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_privmsgs.php')
-rw-r--r--phpBB/includes/functions_privmsgs.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index ac6f4a0afe..f0d0520a03 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -778,7 +778,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
trigger_error('NOT_AUTHORISED');
}
- if ($row['pm_count'] + sizeof($move_msg_ids) > $message_limit)
+ if ($message_limit && $row['pm_count'] + sizeof($move_msg_ids) > $message_limit)
{
$message = sprintf($user->lang['NOT_ENOUGH_SPACE_FOLDER'], $row['folder_name']) . '<br /><br />';
$message .= sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=' . $row['folder_id']) . '">', '</a>', $row['folder_name']);
@@ -795,7 +795,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
$num_messages = (int) $db->sql_fetchfield('num_messages');
$db->sql_freeresult($result);
- if ($num_messages + sizeof($move_msg_ids) > $message_limit)
+ if ($message_limit && $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="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox') . '">', '</a>', $user->lang['PM_INBOX']);
@@ -1281,9 +1281,9 @@ function get_folder_status($folder_id, $folder)
$return = array(
'folder_name' => $folder['folder_name'],
'cur' => $folder['num_messages'],
- 'remaining' => $user->data['message_limit'] - $folder['num_messages'],
+ 'remaining' => ($user->data['message_limit']) ? $user->data['message_limit'] - $folder['num_messages'] : 0,
'max' => $user->data['message_limit'],
- 'percent' => ($user->data['message_limit'] > 0) ? round(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100,
+ 'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? round(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0,
);
$return['message'] = sprintf($user->lang['FOLDER_STATUS_MSG'], $return['percent'], $return['cur'], $return['max']);