r104035 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104034‎ | r104035 | r104036 >
Date:14:23, 23 November 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
kill dead code
Modified paths:
  • /trunk/extensions/Maps/includes/Maps_Mapper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/includes/Maps_Mapper.php
@@ -13,25 +13,6 @@
1414 final class MapsMapper {
1515
1616 /**
17 - * Add a JavaScript file out of skins/common, or a given relative path.
18 - *
19 - * This is a copy of the native function in OutputPage to work around a pre MW 1.16 bug.
20 - * Should be used for adding external files, like the Google Maps API.
21 - *
22 - * @param OutputPage $out
23 - * @param string $file
24 - */
25 - public static function addScriptFile( OutputPage $out, $file ) {
26 - global $wgStylePath, $wgStyleVersion;
27 - if( substr( $file, 0, 1 ) == '/' || preg_match( '#^[a-z]*://#i', $file ) ) {
28 - $path = $file;
29 - } else {
30 - $path = "{$wgStylePath}/common/{$file}";
31 - }
32 - $out->addScript( Html::linkedScript( wfAppendQuery( $path, $wgStyleVersion ) ) );
33 - }
34 -
35 - /**
3617 * Encode a variable of unknown type to JavaScript.
3718 * Arrays are converted to JS arrays, objects are converted to JS associative
3819 * arrays (objects). So cast your PHP associative arrays to objects before

Status & tagging log