Merge "Fix fatal in LocalRepo::findFiles()"
[lhc/web/wiklou.git] / includes / WebRequest.php
index 4ad7344..dfa8cf6 100644 (file)
@@ -54,7 +54,7 @@ class WebRequest {
         * Cached URL protocol
         * @var string
         */
-       private $protocol;
+       protected $protocol;
 
        public function __construct() {
                /// @todo FIXME: This preemptive de-quoting can interfere with other web libraries
@@ -113,8 +113,8 @@ class WebRequest {
                                $router->add( "$wgScript/$1" );
 
                                if ( isset( $_SERVER['SCRIPT_NAME'] )
-                                       && preg_match( '/\.php5?/', $_SERVER['SCRIPT_NAME'] ) )
-                               {
+                                       && preg_match( '/\.php5?/', $_SERVER['SCRIPT_NAME'] )
+                               {
                                        # Check for SCRIPT_NAME, we handle index.php explicitly
                                        # But we do have some other .php files such as img_auth.php
                                        # Don't let root article paths clober the parsing for them
@@ -1522,6 +1522,12 @@ class FauxRequest extends WebRequest {
 class DerivativeRequest extends FauxRequest {
        private $base;
 
+       /**
+        * @param WebRequest $base
+        * @param array $data Array of *non*-urlencoded key => value pairs, the
+        *   fake GET/POST values
+        * @param bool $wasPosted Whether to treat the data as POST
+        */
        public function __construct( WebRequest $base, $data, $wasPosted = false ) {
                $this->base = $base;
                parent::__construct( $data, $wasPosted );