aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/privmsg.php
diff options
context:
space:
mode:
authorthe_systech <the_systech@users.sourceforge.net>2002-03-25 19:40:57 +0000
committerthe_systech <the_systech@users.sourceforge.net>2002-03-25 19:40:57 +0000
commit9b7b652679064d4c8ef20631faa639086d536b22 (patch)
tree45f83bba9467d6b83853fc4b52916c4b81722326 /phpBB/privmsg.php
parentf1c8e6c954abc62c684f94bf838eba6711813a06 (diff)
downloadforums-9b7b652679064d4c8ef20631faa639086d536b22.tar
forums-9b7b652679064d4c8ef20631faa639086d536b22.tar.gz
forums-9b7b652679064d4c8ef20631faa639086d536b22.tar.bz2
forums-9b7b652679064d4c8ef20631faa639086d536b22.tar.xz
forums-9b7b652679064d4c8ef20631faa639086d536b22.zip
Fix for Bug #534313 Max posts in Inbox/Savebox/Sentbox = 0
git-svn-id: file:///svn/phpbb/trunk@2432 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/privmsg.php')
-rw-r--r--phpBB/privmsg.php27
1 files changed, 24 insertions, 3 deletions
diff --git a/phpBB/privmsg.php b/phpBB/privmsg.php
index 6e2300454e..5dfd2a9ad5 100644
--- a/phpBB/privmsg.php
+++ b/phpBB/privmsg.php
@@ -1900,9 +1900,30 @@ else if ( $folder == "sentbox" )
//
if ( $folder != "outbox" )
{
- $inbox_limit_pct = round(( $pm_all_total / $board_config['max_' . $folder . '_privmsgs'] ) * 100);
- $inbox_limit_img_length = round(( $pm_all_total / $board_config['max_' . $folder . '_privmsgs'] ) * $board_config['privmsg_graphic_length']);
- $inbox_limit_remain = $board_config['max_' . $folder . '_privmsgs'] - $pm_all_total;
+ if ( $board_config['max_' . $folder . '_privmsgs'] > 0 )
+ {
+ $inbox_limit_pct = round(( $pm_all_total / $board_config['max_' . $folder . '_privmsgs'] ) * 100);
+ }
+ else
+ {
+ $inbox_limit_pct = 100;
+ }
+ if ( $board_config['max_' . $folder . '_privmsgs'] > 0 )
+ {
+ $inbox_limit_img_length = round(( $pm_all_total / $board_config['max_' . $folder . '_privmsgs'] ) * $board_config['privmsg_graphic_length']);
+ }
+ else
+ {
+ $inbox_limit_img_length = $board_config['privmsg_graphic_length'];
+ }
+ if ( $board_config['max_' . $folder . '_privmsgs'] > 0 )
+ {
+ $inbox_limit_remain = $board_config['max_' . $folder . '_privmsgs'] - $pm_all_total;
+ }
+ else
+ {
+ $inbox_limit_remain = 0;
+ }
$template->assign_block_vars("box_size_notice", array());