also translate 'No file was uploaded. Unknown error'

This commit is contained in:
Jörn Friedrich Dreyer 2013-01-03 11:57:17 +01:00
parent 0405edc798
commit ea732e5b29
1 changed files with 2 additions and 2 deletions

View 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: ')