follow up r89278 — remove FTP support.
authorMark A. Hershberger <mah@users.mediawiki.org>
Sat, 4 Jun 2011 02:59:10 +0000 (02:59 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Sat, 4 Jun 2011 02:59:10 +0000 (02:59 +0000)
includes/HttpFunctions.php

index 75dbbdf..bac062f 100644 (file)
@@ -126,14 +126,13 @@ class Http {
         * and php support.
         *
         * @fixme this is wildly inaccurate and fails to actually check most stuff
-        * @fixme do we actually intend to have FTP support here? Does it work consistently?
         *
         * @param $uri Mixed: URI to check for validity
         * @returns Boolean
         */
        public static function isValidURI( $uri ) {
                return preg_match(
-                       '/^(f|ht)tps?:\/\/[^\/\s]\S*$/D',
+                       '/^https?:\/\/[^\/\s]\S*$/D',
                        $uri
                );
        }
@@ -717,7 +716,6 @@ class PhpHttpRequest extends MWHttpRequest {
                }
 
                if ( $this->parsedUrl['scheme'] != 'http' &&
-                        $this->parsedUrl['scheme'] != 'ftp' &&
                         $this->parsedUrl['scheme'] != 'https' ) {
                        $this->status->fatal( 'http-invalid-scheme', $this->parsedUrl['scheme'] );
                }