From 9bb004963b0ed205a01bfd7e09744263136d5b66 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Fri, 23 Dec 2011 12:28:44 -0500 Subject: Fix whitespace folder name --- files/ajax/newfolder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'files/ajax') 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(); } -- cgit v1.2.3 From 1fe55b665609ad5af1c6b5af4f0b4fad9bede9f3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 23 Dec 2011 19:48:22 +0100 Subject: fix upload error reporting --- files/ajax/upload.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'files/ajax') diff --git a/files/ajax/upload.php b/files/ajax/upload.php index 041ec0c92e3..5f0f68d9531 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"), -- cgit v1.2.3 From 470bab9c682fdbe4dcb331f2f6a00b3a9aefc929 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Sun, 1 Jan 2012 18:45:26 -0500 Subject: Fix typo in move error message --- files/ajax/move.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'files/ajax') 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" ))); } ?> -- cgit v1.2.3