diff options
Diffstat (limited to 'static/classes')
| -rwxr-xr-x | static/classes/Response.class.php | 28 | ||||
| -rw-r--r-- | static/classes/UploadedFile.class.php | 3 |
2 files changed, 15 insertions, 16 deletions
diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index 02e42eb..fac7db5 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -68,16 +68,16 @@ class Response switch ($this->type) { case 'csv': - $response = $this->csv_error($desc); + $response = $this->csvError($desc); break; case 'html': - $response = $this->html_error($code, $desc); + $response = $this->htmlError($code, $desc); break; case 'json': - $response = $this->json_error($code, $desc); + $response = $this->jsonError($code, $desc); break; case 'text': - $response = $this->text_error($code, $desc); + $response = $this->textError($code, $desc); break; } @@ -97,16 +97,16 @@ class Response switch ($this->type) { case 'csv': - $response = $this->csv_success($files); + $response = $this->csvSuccess($files); break; case 'html': - $response = $this->html_success($files); + $response = $this->htmlSuccess($files); break; case 'json': - $response = $this->json_success($files); + $response = $this->jsonSuccess($files); break; case 'text': - $response = $this->text_success($files); + $response = $this->textSuccess($files); break; } @@ -121,7 +121,7 @@ class Response * @param int $description Descriptive error message. * @return string Error message in CSV format. */ - private static function csv_error($description) + private static function csvError($description) { return '"error"'."\r\n"."\"$description\""."\r\n"; } @@ -133,7 +133,7 @@ class Response * @param mixed[] $files * @return string Success message in CSV format. */ - private static function csv_success($files) + private static function csvSuccess($files) { $result = '"name","url","hash","size"'."\r\n"; foreach ($files as $file) { @@ -154,7 +154,7 @@ class Response * @param int $description Descriptive error message. * @return string Error message in HTML format. */ - private static function html_error($code, $description) + private static function htmlError($code, $description) { return '<p>ERROR: ('.$code.') '.$description.'</p>'; } @@ -166,7 +166,7 @@ class Response * @param mixed[] $files * @return string Success message in HTML format. */ - private static function html_success($files) + private static function htmlSuccess($files) { $result = ''; @@ -185,7 +185,7 @@ class Response * @param int $description Descriptive error message. * @return string Error message in pretty-printed JSON format. */ - private static function json_error($code, $description) + private static function jsonError($code, $description) { return json_encode(array( 'success' => false, @@ -201,7 +201,7 @@ class Response * @param mixed[] $files * @return string Success message in pretty-printed JSON format. */ - private static function json_success($files) + private static function jsonSuccess($files) { return json_encode(array( 'success' => true, diff --git a/static/classes/UploadedFile.class.php b/static/classes/UploadedFile.class.php index c55a22d..03b7429 100644 --- a/static/classes/UploadedFile.class.php +++ b/static/classes/UploadedFile.class.php @@ -20,10 +20,9 @@ class UploadedFile /** * Generates the SHA-1 or returns the cached SHA-1 hash for the file. * - * @deprecated 2.1.0 To be replaced with SHA-256 hashing. * @return string|false $sha1 */ - public function get_sha1() + public function getSha1() { if (!$this->sha1) { $this->sha1 = sha1_file($this->tempfile); |
