https://www.mediawiki.org/wiki/Special:Code/MediaWiki/102163

Revision: 102163
Author:   nikerabbit
Date:     2011-11-06 09:17:09 +0000 (Sun, 06 Nov 2011)
Log Message:
-----------
Removed remaining compatibility code for MW <1.17

Modified Paths:
--------------
    trunk/extensions/Translate/_autoload.php
    trunk/extensions/Translate/utils/TranslationEditPage.php

Removed Paths:
-------------
    trunk/extensions/Translate/utils/CompatibilityCode.php

Modified: trunk/extensions/Translate/_autoload.php
===================================================================
--- trunk/extensions/Translate/_autoload.php    2011-11-06 09:16:42 UTC (rev 
102162)
+++ trunk/extensions/Translate/_autoload.php    2011-11-06 09:17:09 UTC (rev 
102163)
@@ -115,7 +115,6 @@
 
 $wgAutoloadClasses['TranslateYaml'] = $dir . 'utils/TranslateYaml.php';
 
-$wgAutoloadClasses['TranslateBC'] = $dir . 'utils/CompatibilityCode.php';
 $wgAutoloadClasses['RevTag'] = $dir . 'utils/RevTag.php';
 
 $wgAutoloadClasses['MessageHandle'] = $dir . 'utils/MessageHandle.php';

Deleted: trunk/extensions/Translate/utils/CompatibilityCode.php
===================================================================
--- trunk/extensions/Translate/utils/CompatibilityCode.php      2011-11-06 
09:16:42 UTC (rev 102162)
+++ trunk/extensions/Translate/utils/CompatibilityCode.php      2011-11-06 
09:17:09 UTC (rev 102163)
@@ -1,47 +0,0 @@
-<?php
-/**
- * Code for facilitiating backwards compatibility for older %MediaWikis.
- *
- * @file
- * @author Niklas Laxström
- * @copyright Copyright © 2010, Niklas Laxström
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
- */
-
-/**
- * General BC code.
- */
-class TranslateBC {
-
-       /**
-        * Create a call to a JavaScript function. The supplied arguments will 
be
-        * encoded using Xml::encodeJsVar().
-        *
-        * @param $name The name of the function to call, or a JavaScript 
expression
-        *    which evaluates to a function object which is called.
-        * @param $args Array of arguments to pass to the function.
-        * @since 1.17
-        *
-        * @return string
-        */
-       public static function encodeJsCall( $name, $args ) {
-               $realFunction = array( 'Xml', 'encodeJsCall' );
-               if ( is_callable( $realFunction ) ) {
-                       return Xml::encodeJsCall( $name, $args );
-               }
-
-               $s = "$name(";
-               $first = true;
-               foreach ( $args as $arg ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $s .= ', ';
-                       }
-                       $s .= Xml::encodeJsVar( $arg );
-               }
-               $s .= ");\n";
-               return $s;
-       }
-
-}

Modified: trunk/extensions/Translate/utils/TranslationEditPage.php
===================================================================
--- trunk/extensions/Translate/utils/TranslationEditPage.php    2011-11-06 
09:16:42 UTC (rev 102162)
+++ trunk/extensions/Translate/utils/TranslationEditPage.php    2011-11-06 
09:17:09 UTC (rev 102163)
@@ -193,7 +193,7 @@
                }
 
                return array(
-                       'onclick' => TranslateBC::encodeJsCall(
+                       'onclick' => Xml::encodeJsCall(
                                'return trlOpenJsEdit', array( 
$title->getPrefixedDbKey(), $group ) ),
                        'title' => wfMsg( 'translate-edit-title', 
$title->getPrefixedText() )
                );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to