diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2015-09-29 18:19:58 +0200 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2015-09-29 18:19:58 +0200 |
| commit | e39a920f6d41f8d90470f15c4a58f6abebbace92 (patch) | |
| tree | 76035c9684a3b4264a39a44cb03750cd8bf9b609 /static/classes/Response.class.php | |
| parent | caf85faa1c62eaea0d9a614ff9e8283e60af9d33 (diff) | |
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@
Diffstat (limited to 'static/classes/Response.class.php')
| -rwxr-xr-x | static/classes/Response.class.php | 21 |
1 files changed, 2 insertions, 19 deletions
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; |
