r94851 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94850‎ | r94851 | r94852 >
Date:00:54, 18 August 2011
Author:reedy
Status:ok
Tags:
Comment:
Upstreaming wikia change to WebRequest

Trim trailing whitespace

Tweak documentation
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/WebRequest.php (modified) (history)
  • /trunk/phase3/includes/parser/ParserCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -2106,7 +2106,7 @@
21072107 }
21082108
21092109 /**
2110 - * @param $status Status
 2110+ * @param $status Status
21112111 */
21122112 function error( $status ) {
21132113 global $wgOut;
Index: trunk/phase3/includes/parser/ParserCache.php
@@ -194,7 +194,6 @@
195195 * @param $parserOutput ParserOutput
196196 * @param $article Article
197197 * @param $popts ParserOptions
198 - * @return void
199198 */
200199 public function save( $parserOutput, $article, $popts ) {
201200 $expire = $parserOutput->getCacheExpiry();
Index: trunk/phase3/includes/WebRequest.php
@@ -160,11 +160,11 @@
161161
162162 return $proto . '://' . IP::combineHostAndPort( $host, $port, $stdPort );
163163 }
164 -
 164+
165165 public static function detectProtocolAndStdPort() {
166166 return ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) ? array( 'https', 443 ) : array( 'http', 80 );
167167 }
168 -
 168+
169169 public static function detectProtocol() {
170170 list( $proto, $stdPort ) = self::detectProtocolAndStdPort();
171171 return $proto;
@@ -520,7 +520,7 @@
521521 * @return Boolean
522522 */
523523 public function wasPosted() {
524 - return $_SERVER['REQUEST_METHOD'] == 'POST';
 524+ return isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] == 'POST';
525525 }
526526
527527 /**
@@ -597,7 +597,7 @@
598598 * Return the request URI with the canonical service and hostname, path,
599599 * and query string. This will be suitable for use as an absolute link
600600 * in HTML or other output.
601 - *
 601+ *
602602 * NOTE: This will output a protocol-relative URL if $wgServer is protocol-relative
603603 *
604604 * @return String

Sign-offs

UserFlagDate
Ucuchainspected00:59, 18 August 2011

Status & tagging log