mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 07:18:08 +02:00
[ticket/14168] Use language class and fix incorrect docblock
PHPBB3-14168
This commit is contained in:
@@ -96,7 +96,7 @@ class upload
|
|||||||
*
|
*
|
||||||
* @return object filespec
|
* @return object filespec
|
||||||
*/
|
*/
|
||||||
public function upload($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false)
|
public function upload($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = array())
|
||||||
{
|
{
|
||||||
$filedata = array(
|
$filedata = array(
|
||||||
'error' => array()
|
'error' => array()
|
||||||
@@ -115,7 +115,7 @@ class upload
|
|||||||
|
|
||||||
if (!$filedata['post_attach'])
|
if (!$filedata['post_attach'])
|
||||||
{
|
{
|
||||||
$filedata['error'][] = $this->user->lang['NO_UPLOAD_FORM_FOUND'];
|
$filedata['error'][] = $this->language->lang('NO_UPLOAD_FORM_FOUND');
|
||||||
return $filedata;
|
return $filedata;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ class upload
|
|||||||
|
|
||||||
// If this error occurs a user tried to exploit an IE Bug by renaming extensions
|
// If this error occurs a user tried to exploit an IE Bug by renaming extensions
|
||||||
// Since the image category is displaying content inline we need to catch this.
|
// Since the image category is displaying content inline we need to catch this.
|
||||||
trigger_error($this->user->lang['ATTACHED_IMAGE_NOT_IMAGE']);
|
trigger_error($this->language->lang('ATTACHED_IMAGE_NOT_IMAGE'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$filedata['filesize'] = $file->get('filesize');
|
$filedata['filesize'] = $file->get('filesize');
|
||||||
@@ -214,7 +214,7 @@ class upload
|
|||||||
{
|
{
|
||||||
if (intval($this->config['upload_dir_size']) + $file->get('filesize') > $this->config['attachment_quota'])
|
if (intval($this->config['upload_dir_size']) + $file->get('filesize') > $this->config['attachment_quota'])
|
||||||
{
|
{
|
||||||
$filedata['error'][] = $this->user->lang['ATTACH_QUOTA_REACHED'];
|
$filedata['error'][] = $this->language->lang('ATTACH_QUOTA_REACHED');
|
||||||
$filedata['post_attach'] = false;
|
$filedata['post_attach'] = false;
|
||||||
|
|
||||||
$file->remove();
|
$file->remove();
|
||||||
@@ -230,11 +230,11 @@ class upload
|
|||||||
{
|
{
|
||||||
if ($this->auth->acl_get('a_'))
|
if ($this->auth->acl_get('a_'))
|
||||||
{
|
{
|
||||||
$filedata['error'][] = $this->user->lang['ATTACH_DISK_FULL'];
|
$filedata['error'][] = $this->language->lang('ATTACH_DISK_FULL');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$filedata['error'][] = $this->user->lang['ATTACH_QUOTA_REACHED'];
|
$filedata['error'][] = $this->language->lang('ATTACH_QUOTA_REACHED');
|
||||||
}
|
}
|
||||||
$filedata['post_attach'] = false;
|
$filedata['post_attach'] = false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user