]> source.dussan.org Git - nextcloud-server.git/commitdiff
also translate 'No file was uploaded. Unknown error'
authorJörn Friedrich Dreyer <jfd@butonic.de>
Thu, 3 Jan 2013 10:57:17 +0000 (11:57 +0100)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Thu, 3 Jan 2013 10:57:17 +0000 (11:57 +0100)
apps/files/ajax/upload.php

index 0909a3f07768b46c6c0d29c5ca5c7f3f72ef4ad6..4053cf5f8b0bd20ee9b1bd969b37766a42ae3b21 100644 (file)
@@ -8,14 +8,14 @@ OCP\JSON::setContentTypeHeader('text/plain');
 
 OCP\JSON::checkLoggedIn();
 OCP\JSON::callCheck();
+$l=OC_L10N::get('files');
 
 if (!isset($_FILES['files'])) {
-       OCP\JSON::error(array('data' => array( 'message' => 'No file was uploaded. Unknown error' )));
+       OCP\JSON::error(array('data' => array( 'message' => $l->t( 'No file was uploaded. Unknown error' ))));
        exit();
 }
 foreach ($_FILES['files']['error'] as $error) {
        if ($error != 0) {
-               $l=OC_L10N::get('files');
                $errors = array(
                        UPLOAD_ERR_OK=>$l->t('There is no error, the file uploaded with success'),
                        UPLOAD_ERR_INI_SIZE=>$l->t('The uploaded file exceeds the upload_max_filesize directive in php.ini: ')