Commit graph

8 commits

Author SHA1 Message Date
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Amir E. Aharoni
c6f066b88c Make long lines shorter to pass phpcs in 6 files
Bug: T102614
Change-Id: I3159c33ddd16bded94a70f363258a294f407fc58
2015-09-26 17:07:06 +00:00
Timo Tijhof
7b835dd126 HttpStatus: Implement header() method
Standardise this. Currently MediaWiki does this in many different ways.

> WebResponse->header( "HTTP/1.0 $code $message" );
> WebResponse->header( "HTTP/1.1 $code $message" );
> WebResponse->header( "HTTP/1.x $code $message" );
> WebResponse->header( "HTTP/1.1 $code " . HttpStatus::getMessage( $code ) );
> WebResponse->header( "HTTP/1.1 $code $message", true, $code );
> header( "Status: $code $message", true, $code );

Change-Id: I1551e89808a1a67310549ec8d9fcb387754c9169
2015-06-04 02:15:39 +00:00
umherirrender
b18d8d7e01 Remove OutputPage::getStatusMessage() (deprecated since 1.18)
Also removed a comment where the method was mentioned.

Change-Id: I802f0f41e107a1d677fb899f6e09ea31df3c4e6f
2014-07-09 01:41:18 +02:00
Faidon Liambotis
c4f14616c4 HttpStatus: add RFC 6585 status codes
Add newer (Apr 2012) HTTP status codes & their messages to HttpStatus'
getMessage. Adds 428, 429, 431, 511 per RFC 6585, "Additional HTTP
Status Codes".

Change-Id: Ia055880c4b2f3ac43cf5d94dbdd45a3690a58569
2014-03-28 12:25:14 +02:00
Ori Livneh
49bec29fc9 Fix typo ('associed' => 'associated').
Change-Id: I5ea2eec92ebe397f2d269562f1650e59cb969a19
2013-06-14 15:26:36 -07:00
Alexandre Emsenhuber
63176b99b7 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I1deb70318d01a257b51948ba806d80cd1a239f4f
2012-05-04 08:47:07 +02:00
Antoine Musso
a2d41b8d6f HTTP status messages move: OutputPage -> HttpStatus
OutputPage::getStatusMessage() is a method to convert a numeric HTTP status
code to an english message.  It does not really belong to the OutputPage were
it was for historical reason.
This patch move the basic function to a non MediaWiki dependant class in our
directory includes/libs.  We could potentially enhances it, but I do not see
any use cases for us yet.
I have renamed the method to the shorter 'getMessage' since the word 'status'
is now in the class name.

Summary of changes:
* OutputPage::getStatusMessage becomes HttpStatus::getMessage
* Method moved to the new includes/libs/HttpStatus.php
* Autoloader updated
* History kept by using 'svn copy'
* No functional changes
* No input/output format changes
* Old occurences modified in phase3
* OutputPage::getStatusMessages() marked as deprecated

PHPUnit test suite is fine.
Tested manually using a redirection
2011-07-04 21:01:19 +00:00