From: Roan Kattouw Date: Tue, 2 Feb 2010 00:44:32 +0000 (+0000) Subject: Allow external URLs (e.g. http://bits.wikimedia.org/foo) in OutputPage::addScript() X-Git-Tag: 1.31.0-rc.0~37982 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=5ebf5c46f5f3f276ce24d00acb4ca86029e8adab;p=lhc%2Fweb%2Fwiklou.git Allow external URLs (e.g. bits.wikimedia.org/foo) in OutputPage::addScript() --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index f883a2dd49..a37890596c 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -186,7 +186,7 @@ class OutputPage { */ public function addScriptFile( $file ) { global $wgStylePath, $wgStyleVersion; - if( substr( $file, 0, 1 ) == '/' ) { + if( substr( $file, 0, 1 ) == '/' || substr( $file, 0, 7 ) == 'http://' ) { $path = $file; } else { $path = "{$wgStylePath}/common/{$file}";