summaryrefslogtreecommitdiff
path: root/static/classes/Response.class.php
diff options
context:
space:
mode:
authorJuuso Lapinlampi <wub@partyvan.eu>2016-05-29 16:43:47 +0200
committerJuuso Lapinlampi <wub@partyvan.eu>2016-05-29 16:43:47 +0200
commit647d32a29978579f88baa7c06c207e6a8d6a0d3e (patch)
treeab98bde10e4d7834a57402fbcaa2735eec146136 /static/classes/Response.class.php
parent22063af06536671b680fa9bc84b4626192c106cc (diff)
parent2933ff1b06223a96b27d8e78ba5c04ab43806b55 (diff)
Merge branch 'wub/deprecate-ewhal'
Deprecate (nearly) all things authored by Eliot Whalan. Misfeatures and customizations specifically used only by Pantsu.cat, and design choices where complexity and code duplication do not matter to achieve features easily are his efforts. Cue code maintenance hell. This merge includes: - pages: Bring back autistic neckbeard rant - pages: Deprecate JavaScript-free upload - pages: Deprecate other services - Response: Deprecate HTML and text responses Eliot disagrees with this merge and threatens to branch off development. No commits by ewhal@ since 2016 to today, only code reviews. Anything that extends Pomf core functionality should be a repository or a branch of its own, an extension. If later removed, HTML and text responses may be reintroduced as extensions (pomf-response-html, pomf-response-text repositories) or as different PHP files/classes once the code is stable enough to support those features in a sensible and maintainable way. The JavaScript-free uploader is a mess of duplicated Swig templates. The "other services" page is mainly only useful for Pantsu.cat. I love autistic neckbeards. Then there's this quote: ewhal4 | I've made pantsu.cat as autism friendly as possible and now you are removing it :( Preliminary, I welcome to follow ~wub/pomf.git if development branches off from here.
Diffstat (limited to 'static/classes/Response.class.php')
-rwxr-xr-xstatic/classes/Response.class.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php
index 48b9b58..03dfad7 100755
--- a/static/classes/Response.class.php
+++ b/static/classes/Response.class.php
@@ -58,6 +58,7 @@ class Response
$this->type = $response_type;
break;
case 'html':
+ // Deprecated since version 2.1.0
header('Content-Type: text/html; charset=UTF-8');
$this->type = $response_type;
break;
@@ -71,6 +72,7 @@ class Response
$this->type = 'text';
break;
case 'text':
+ // Deprecated since version 2.1.0
header('Content-Type: text/plain; charset=UTF-8');
$this->type = $response_type;
break;
@@ -98,12 +100,14 @@ class Response
$response = $this->csv_error($desc);
break;
case 'html':
+ // Deprecated since version 2.1.0
$response = $this->html_error($code, $desc);
break;
case 'json':
$response = $this->json_error($code, $desc);
break;
case 'text':
+ // Deprecated since version 2.1.0
$response = $this->text_error($code, $desc);
break;
}
@@ -127,12 +131,14 @@ class Response
$response = $this->csv_success($files);
break;
case 'html':
+ // Deprecated since version 2.1.0
$response = $this->html_success($files);
break;
case 'json':
$response = $this->json_success($files);
break;
case 'text':
+ // Deprecated since version 2.1.0
$response = $this->text_success($files);
break;
}
@@ -176,7 +182,8 @@ class Response
/**
* Indicates with HTML body the request was invalid.
*
- * @deprecated 2.1.0 Will be renamed to camelCase format.
+ * @deprecated 2.1.0 May be removed in a major release or renamed to
+ * camelCase format.
* @param int $code HTTP status code number.
* @param int $description Descriptive error message.
* @return string Error message in HTML format.
@@ -189,7 +196,8 @@ class Response
/**
* Indicates with HTML body the request was successful.
*
- * @deprecated 2.1.0 Will be renamed to camelCase format.
+ * @deprecated 2.1.0 May be removed in a major release or renamed to
+ * camelCase format.
* @param mixed[] $files
* @return string Success message in HTML format.
*/
@@ -239,7 +247,8 @@ class Response
/**
* Indicates with plain text body the request was invalid.
*
- * @deprecated 2.1.0 Will be renamed to camelCase format.
+ * @deprecated 2.1.0 May be removed in a major release or renamed to
+ * camelCase format.
* @param int $code HTTP status code number.
* @param int $description Descriptive error message.
* @return string Error message in plain text format.
@@ -252,7 +261,8 @@ class Response
/**
* Indicates with plain text body the request was successful.
*
- * @deprecated 2.1.0 Will be renamed to camelCase format.
+ * @deprecated 2.1.0 May be removed in a major release or renamed to
+ * camelCase format.
* @param mixed[] $files
* @return string Success message in plain text format.
*/