aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Foote <dicky@phpbb.com>2012-03-19 15:08:28 -0400
committerRichard Foote <dicky@phpbb.com>2012-03-19 15:08:28 -0400
commit97d4f168f588288df071e4a8b107b9ffb8b0355f (patch)
treeb3d1e654f87321a78d7577073e62540290c262e2
parent81eeafbb8dfb6f3511d689169a2ccc46f3d07704 (diff)
downloadforums-97d4f168f588288df071e4a8b107b9ffb8b0355f.tar
forums-97d4f168f588288df071e4a8b107b9ffb8b0355f.tar.gz
forums-97d4f168f588288df071e4a8b107b9ffb8b0355f.tar.bz2
forums-97d4f168f588288df071e4a8b107b9ffb8b0355f.tar.xz
forums-97d4f168f588288df071e4a8b107b9ffb8b0355f.zip
[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
-rw-r--r--phpBB/includes/functions_posting.php9
-rw-r--r--phpBB/language/en/posting.php1
2 files changed, 9 insertions, 1 deletions
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)',