summaryrefslogtreecommitdiff
path: root/static/php
diff options
context:
space:
mode:
Diffstat (limited to 'static/php')
-rw-r--r--static/php/classes/UploadException.class.php18
-rw-r--r--static/php/upload.php10
2 files changed, 14 insertions, 14 deletions
diff --git a/static/php/classes/UploadException.class.php b/static/php/classes/UploadException.class.php
index 8c9e4f6..a70314f 100644
--- a/static/php/classes/UploadException.class.php
+++ b/static/php/classes/UploadException.class.php
@@ -31,30 +31,30 @@ class UploadException extends Exception
{
switch ($code) {
case UPLOAD_ERR_INI_SIZE:
- $message = 'The uploaded file exceeds the upload_max_filesize directive in php.ini';
+ $message = 'Przesłany plik przekracza rozmiar dozwolony przez dyrektywę upload_max_filesize w pliku php.ini';
break;
case UPLOAD_ERR_FORM_SIZE:
- $message = 'The uploaded file exceeds the MAX_FILE_SIZE directive that was '.
- 'specified in the HTML form';
+ $message = 'Przesłany plik przekracza rozmiar dozwolony przez dyrektywę MAX_FILE_SIZE '.
+ 'podaną w formularzu HTML';
break;
case UPLOAD_ERR_PARTIAL:
- $message = 'The uploaded file was only partially uploaded';
+ $message = 'Plik został przesłany jedynie częściowo';
break;
case UPLOAD_ERR_NO_FILE:
- $message = 'No file was uploaded';
+ $message = 'Nie przesłano żadnego pliku';
break;
case UPLOAD_ERR_NO_TMP_DIR:
- $message = 'Missing a temporary folder';
+ $message = 'Brak katalogu tymczasowego';
break;
case UPLOAD_ERR_CANT_WRITE:
- $message = 'Failed to write file to disk';
+ $message = 'Nie udało się zapisać pliku na dysku';
break;
case UPLOAD_ERR_EXTENSION:
- $message = 'File upload stopped by extension';
+ $message = 'Niedozwolony format pliku';
break;
default:
- $message = 'Unknown upload error';
+ $message = 'Nieznany błąd przesyłania';
break;
}
diff --git a/static/php/upload.php b/static/php/upload.php
index 9bb9d3f..c8bae73 100644
--- a/static/php/upload.php
+++ b/static/php/upload.php
@@ -39,7 +39,7 @@ function generateName($file)
// Iterate until we reach the maximum number of retries
if ($tries-- === 0) {
throw new Exception(
- 'Gave up trying to find an unused name',
+ 'Nie udało się znaleźć nieużywanej nazwy pliku',
500
); // HTTP status code "500 Internal Server Error"
}
@@ -128,7 +128,7 @@ function uploadFile($file)
// Attempt to move it to the static directory
if (!move_uploaded_file($file->tempfile, $uploadFile)) {
throw new Exception(
- 'Failed to move file to destination',
+ 'Nie udało się przenieść pliku do celu',
500
); // HTTP status code "500 Internal Server Error"
}
@@ -136,7 +136,7 @@ function uploadFile($file)
// Need to change permissions for the new file to make it world readable
if (!chmod($uploadFile, 0644)) {
throw new Exception(
- 'Failed to change file permissions',
+ 'Nie udało się zmienić uprawnień pliku',
500
); // HTTP status code "500 Internal Server Error"
}
@@ -223,8 +223,8 @@ if ($login->isLoggedIn()) {
$response->error($e->getCode(), $e->getMessage());
}
} else {
- $response->error(400, 'No input file(s)');
+ $response->error(400, 'Nie przesłano żadnego pliku');
}
} else {
- $response->error(403, 'You are not logged in');
+ $response->error(403, 'Nie jesteś zalogowana/y');
}