The http-invalid-url message has a parameter, so send it
authorBrian Wolff <bawolff+wn@gmail.com>
Fri, 24 Jul 2015 13:05:57 +0000 (07:05 -0600)
committerBrian Wolff <bawolff+wn@gmail.com>
Fri, 24 Jul 2015 13:11:11 +0000 (07:11 -0600)
Currently was outputting raw $1 to user.

Change-Id: If1d10270f4d446c4d1703457903034e8356c1503

includes/HttpFunctions.php
includes/upload/UploadFromUrl.php

index 825cd06..7b43a2d 100644 (file)
@@ -252,7 +252,7 @@ class MWHttpRequest {
                $this->parsedUrl = wfParseUrl( $this->url );
 
                if ( !$this->parsedUrl || !Http::isValidURI( $this->url ) ) {
-                       $this->status = Status::newFatal( 'http-invalid-url' );
+                       $this->status = Status::newFatal( 'http-invalid-url', $url );
                } else {
                        $this->status = Status::newGood( 100 ); // continue
                }
index 4c099b3..f578745 100644 (file)
@@ -195,7 +195,7 @@ class UploadFromUrl extends UploadBase {
         */
        public function fetchFile( $httpOptions = array() ) {
                if ( !Http::isValidURI( $this->mUrl ) ) {
-                       return Status::newFatal( 'http-invalid-url' );
+                       return Status::newFatal( 'http-invalid-url', $this->mUrl );
                }
 
                if ( !self::isAllowedHost( $this->mUrl ) ) {