diff options
Diffstat (limited to 'static')
| -rwxr-xr-x | static/classes/Response.class.php | 4 | ||||
| -rw-r--r-- | static/upload.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index 3afcfdb..53fadef 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -164,7 +164,7 @@ class Response 'success' => false, 'errorcode' => $code, 'description' => $description, - )); + ), JSON_PRETTY_PRINT); } private static function json_success($files) @@ -172,6 +172,6 @@ class Response return json_encode(array( 'success' => true, 'files' => $files, - )); + ), JSON_PRETTY_PRINT); } } diff --git a/static/upload.php b/static/upload.php index 655dd9c..a37c549 100644 --- a/static/upload.php +++ b/static/upload.php @@ -80,7 +80,7 @@ function generate_name($file) } // Check if a file with the same name does already exist in the database - $q = $db->prepare('SELECT COUNT(name) FROM pomf WHERE name = (:name)'); + $q = $db->prepare('SELECT COUNT(filename) FROM files WHERE filename = (:name)'); $q->bindValue(':name', $name, PDO::PARAM_STR); $q->execute(); $result = $q->fetchColumn(); |
