From 5ebf5c46f5f3f276ce24d00acb4ca86029e8adab Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 2 Feb 2010 00:44:32 +0000 Subject: [PATCH] Allow external URLs (e.g. http://bits.wikimedia.org/foo) in OutputPage::addScript() --- includes/OutputPage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}"; -- 2.20.1