From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- includes/WebResponse.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'includes/WebResponse.php') diff --git a/includes/WebResponse.php b/includes/WebResponse.php index ab34931c..1b6947cd 100644 --- a/includes/WebResponse.php +++ b/includes/WebResponse.php @@ -28,7 +28,7 @@ class WebResponse { /** - * Output a HTTP header, wrapper for PHP's header() + * Output an HTTP header, wrapper for PHP's header() * @param string $string Header to output * @param bool $replace Replace current similar header * @param null|int $http_response_code Forces the HTTP response code to the specified value. @@ -53,6 +53,15 @@ class WebResponse { return null; } + /** + * Output an HTTP status code header + * @since 1.26 + * @param int $code Status code + */ + public function statusHeader( $code ) { + HttpStatus::header( $code ); + } + /** * Set the browser cookie * @param string $name The name of the cookie. @@ -162,6 +171,14 @@ class FauxResponse extends WebResponse { } } + /** + * @since 1.26 + * @param int $code Status code + */ + public function statusHeader( $code ) { + $this->code = intval( $code ); + } + /** * @param string $key The name of the header to get (case insensitive). * @return string|null The header value (if set); null otherwise. -- cgit v1.2.2