From 97d4f168f588288df071e4a8b107b9ffb8b0355f Mon Sep 17 00:00:00 2001 From: Richard Foote Date: Mon, 19 Mar 2012 15:08:28 -0400 Subject: [PATCH 1/2] [ticket/10675] Add disk full language string when posting attachments Add language string visible by admins only for when the disk does not have enough free space to upload attachments. PHPBB3-10675 --- phpBB/includes/functions_posting.php | 9 ++++++++- phpBB/language/en/posting.php | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index f920be9c4b..b40fd67927 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -497,7 +497,14 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage { if ($free_space <= $file->get('filesize')) { - $filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED']; + if ($auth->acl_get('a_')) + { + $filedata['error'][] = $user->lang['ATTACH_DISK_FULL']; + } + else + { + $filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED']; + } $filedata['post_attach'] = false; $file->remove(); diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index f8d265dddd..dd0ba7fc6d 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -42,6 +42,7 @@ $lang = array_merge($lang, array( 'ADD_POLL' => 'Poll creation', 'ADD_POLL_EXPLAIN' => 'If you do not want to add a poll to your topic leave the fields blank.', 'ALREADY_DELETED' => 'Sorry but this message is already deleted.', + 'ATTACH_DISK_FULL' => 'There is not enough free disk space to post this attachment', 'ATTACH_QUOTA_REACHED' => 'Sorry, the board attachment quota has been reached.', 'ATTACH_SIG' => 'Attach a signature (signatures can be altered via the UCP)', From b8b342be2d238616b96ace9acbe8af2e18ba1e7a Mon Sep 17 00:00:00 2001 From: Richard Foote Date: Sat, 31 Mar 2012 12:46:44 -0400 Subject: [PATCH 2/2] [Ticket/10675] Correct language string ATTACH_DISK_FULL Add period to ATTACH_DISK_FULL language string PHPBB3-10675 --- phpBB/language/en/posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index dd0ba7fc6d..24f3204c57 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -42,7 +42,7 @@ $lang = array_merge($lang, array( 'ADD_POLL' => 'Poll creation', 'ADD_POLL_EXPLAIN' => 'If you do not want to add a poll to your topic leave the fields blank.', 'ALREADY_DELETED' => 'Sorry but this message is already deleted.', - 'ATTACH_DISK_FULL' => 'There is not enough free disk space to post this attachment', + 'ATTACH_DISK_FULL' => 'There is not enough free disk space to post this attachment.', 'ATTACH_QUOTA_REACHED' => 'Sorry, the board attachment quota has been reached.', 'ATTACH_SIG' => 'Attach a signature (signatures can be altered via the UCP)',