summaryrefslogtreecommitdiffstats
path: root/files/ajax
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2012-01-08 01:53:40 +0100
committerRobin Appelman <icewind1991@gmail.com>2012-01-08 01:53:40 +0100
commitd1edc360d9bd7d97c35d25b54dadec61004cd869 (patch)
tree7344744268280ccbdc194746a7b40dfc90a33260 /files/ajax
parent3844fb0e4ce093bb3c2e67d20f85f61b7723efdc (diff)
parent8f8985c3e53862e2ca6446f296d4835a9577faac (diff)
downloadnextcloud-server-d1edc360d9bd7d97c35d25b54dadec61004cd869.tar.gz
nextcloud-server-d1edc360d9bd7d97c35d25b54dadec61004cd869.zip
merge master into filesystem
Diffstat (limited to 'files/ajax')
-rw-r--r--files/ajax/move.php2
-rw-r--r--files/ajax/newfolder.php2
-rw-r--r--files/ajax/upload.php3
3 files changed, 4 insertions, 3 deletions
diff --git a/files/ajax/move.php b/files/ajax/move.php
index 8a56a015486..3517901c6cf 100644
--- a/files/ajax/move.php
+++ b/files/ajax/move.php
@@ -14,7 +14,7 @@ $target = $_GET["target"];
if(OC_Files::move($dir,$file,$target,$file)){
OC_JSON::success(array("data" => array( "dir" => $dir, "files" => $file )));
}else{
- OC_JSON::error(array("data" => array( "message" => "Could move $file" )));
+ OC_JSON::error(array("data" => array( "message" => "Could not move $file" )));
}
?>
diff --git a/files/ajax/newfolder.php b/files/ajax/newfolder.php
index 6966e912c56..d244fb7be19 100644
--- a/files/ajax/newfolder.php
+++ b/files/ajax/newfolder.php
@@ -9,7 +9,7 @@ OC_JSON::checkLoggedIn();
$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
$foldername = isset( $_GET['foldername'] ) ? $_GET['foldername'] : '';
-if($foldername == '') {
+if(trim($foldername) == '') {
OC_JSON::error(array("data" => array( "message" => "Empty Foldername" )));
exit();
}
diff --git a/files/ajax/upload.php b/files/ajax/upload.php
index d9dafde7779..241edc216ff 100644
--- a/files/ajax/upload.php
+++ b/files/ajax/upload.php
@@ -14,9 +14,10 @@ if (!isset($_FILES['files'])) {
}
foreach ($_FILES['files']['error'] as $error) {
if ($error != 0) {
+ $l=new OC_L10N('files');
$errors = array(
0=>$l->t("There is no error, the file uploaded with success"),
- 1=>$l->t("The uploaded file exceeds the upload_max_filesize directive in php.ini"),
+ 1=>$l->t("The uploaded file exceeds the upload_max_filesize directive in php.ini").ini_get('upload_max_filesize'),
2=>$l->t("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form"),
3=>$l->t("The uploaded file was only partially uploaded"),
4=>$l->t("No file was uploaded"),