follow-up r61836 - allow any URL
authorMark A. Hershberger <mah@users.mediawiki.org>
Fri, 26 Feb 2010 02:41:49 +0000 (02:41 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Fri, 26 Feb 2010 02:41:49 +0000 (02:41 +0000)
includes/OutputPage.php

index 0b4a45c..4543569 100644 (file)
@@ -186,7 +186,7 @@ class OutputPage {
         */
        public function addScriptFile( $file ) {
                global $wgStylePath, $wgStyleVersion;
-               if( substr( $file, 0, 1 ) == '/' || substr( $file, 0, 7 ) == 'http://' ) {
+               if( substr( $file, 0, 1 ) == '/' || preg_match( '#^[a-z]*://#i', $file ) ) {
                        $path = $file;
                } else {
                        $path =  "{$wgStylePath}/common/{$file}";