Upstreaming wikia change to WebRequest
authorSam Reed <reedy@users.mediawiki.org>
Thu, 18 Aug 2011 00:54:06 +0000 (00:54 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 18 Aug 2011 00:54:06 +0000 (00:54 +0000)
Trim trailing whitespace

Tweak documentation

includes/Article.php
includes/WebRequest.php
includes/parser/ParserCache.php

index 591216d..3af6351 100644 (file)
@@ -2106,7 +2106,7 @@ class PoolWorkArticleView extends PoolCounterWork {
        }
 
        /**
-        * @param  $status Status
+        * @param $status Status
         */
        function error( $status ) {
                global $wgOut;
index cfb6ce1..6c20324 100644 (file)
@@ -160,11 +160,11 @@ class WebRequest {
 
                return $proto . '://' . IP::combineHostAndPort( $host, $port, $stdPort );
        }
-       
+
        public static function detectProtocolAndStdPort() {
                return ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) ? array( 'https', 443 ) : array( 'http', 80 );
        }
-       
+
        public static function detectProtocol() {
                list( $proto, $stdPort ) = self::detectProtocolAndStdPort();
                return $proto;
@@ -520,7 +520,7 @@ class WebRequest {
         * @return Boolean
         */
        public function wasPosted() {
-               return $_SERVER['REQUEST_METHOD'] == 'POST';
+               return isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] == 'POST';
        }
 
        /**
@@ -597,7 +597,7 @@ class WebRequest {
         * Return the request URI with the canonical service and hostname, path,
         * and query string. This will be suitable for use as an absolute link
         * in HTML or other output.
-        * 
+        *
         * NOTE: This will output a protocol-relative URL if $wgServer is protocol-relative
         *
         * @return String
index 9515859..b8cf1bb 100644 (file)
@@ -194,7 +194,6 @@ class ParserCache {
         * @param $parserOutput ParserOutput
         * @param $article Article
         * @param $popts ParserOptions
-        * @return void
         */
        public function save( $parserOutput, $article, $popts ) {
                $expire = $parserOutput->getCacheExpiry();