From e39a920f6d41f8d90470f15c4a58f6abebbace92 Mon Sep 17 00:00:00 2001 From: Juuso Lapinlampi Date: Tue, 29 Sep 2015 16:19:58 +0000 Subject: Deprecate Gyazo response, fallthrough to text/plain A majority of the Gyazo code is just copy-pasted text/plain protocol. This will put an end to that insanity. OK ewhal@ --- static/classes/Response.class.php | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'static') diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index a83cb6a..c8ddfa2 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -35,9 +35,8 @@ class Response $this->type = $response_type; break; case 'gyazo': - header('Content-Type: text/plain; charset=UTF-8'); - $this->type = $response_type; - break; + // Deprecated API since version 2.0.0 + // fallthrough case 'text': header('Content-Type: text/plain; charset=UTF-8'); $this->type = $response_type; @@ -61,9 +60,6 @@ class Response case 'csv': $response = $this->csv_error($desc); break; - case 'gyazo': - $response = $this->gyazo_error($code, $desc); - break; case 'text': $response = $this->text_error($code, $desc); break; @@ -90,9 +86,6 @@ class Response case 'csv': $response = $this->csv_success($files); break; - case 'gyazo': - $response = $this->gyazo_success($files); - break; case 'text': $response = $this->text_success($files); break; @@ -123,16 +116,6 @@ class Response return $result; } - private static function gyazo_error($code, $description) - { - return 'ERROR: ('.$code.') '.$description; - } - - private static function gyazo_success($files) - { - return POMF_URL.$files[0]['url']; - } - private static function text_error($code, $description) { return 'ERROR: ('.$code.') '.$description; -- cgit v1.2.3