Kghbln has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/367866 )

Change subject: Remove I18n php shim and bump version
......................................................................

Remove I18n php shim and bump version

Note: This is breaking for MW 1.22.x and earlier.

Bug:T168353
Change-Id: I87660ba80f0c5fedd8bafd6b5d517707de1a7efa
---
D UserFunctions.i18n.php
M UserFunctions.php
2 files changed, 7 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UserFunctions 
refs/changes/66/367866/1

diff --git a/UserFunctions.i18n.php b/UserFunctions.i18n.php
deleted file mode 100644
index 44e62bc..0000000
--- a/UserFunctions.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShimf1b8d49fc546afa0' ) ) {
-       function wfJsonI18nShimf1b8d49fc546afa0( $cache, $code, &$cachedData ) {
-               $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-               foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
-                       if ( is_readable( $fileName ) ) {
-                               $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-                               foreach ( array_keys( $data ) as $key ) {
-                                       if ( $key === '' || $key[0] === '@' ) {
-                                               unset( $data[$key] );
-                                       }
-                               }
-                               $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-                       }
-
-                       $cachedData['deps'][] = new FileDependency( $fileName );
-               }
-               return true;
-       }
-
-       $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShimf1b8d49fc546afa0';
-}
diff --git a/UserFunctions.php b/UserFunctions.php
index c157cfb..ea64443 100644
--- a/UserFunctions.php
+++ b/UserFunctions.php
@@ -1,9 +1,11 @@
 <?php
 /**
  * UserFunctions extension - Provides a set of dynamic parser functions that 
trigger on the current user.
- * @version 2.6.1 - 2014/11/15 (Based on ParserFunctions)
+ * @version 2.7.0 - 2017/07/26 (Based on ParserFunctions)
  *
- * @link http://www.mediawiki.org/wiki/Extension:UserFunctions Documentation
+ * @link https://www.mediawiki.org/wiki/Extension:UserFunctions Documentation
+ * @link https://www.mediawiki.org/wiki/Extension_talk:UserFunctions Support
+ * @link https://phabricator.wikimedia.org/diffusion/EUFU/ Source code
  *
  * @file UserFunctions.php
  * @ingroup Extensions
@@ -16,9 +18,10 @@
  * @author Toniher
  * @author Uckelman
  * @copyright (C) 2006 Algorithm
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
+ * @license https://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
 
+// Ensure that the script cannot be executed outside of MediaWiki.
 if ( !defined( 'MEDIAWIKI' ) ) {
        die( 'This file is a MediaWiki extension, it is not a valid entry 
point' );
 }
@@ -46,7 +49,7 @@
        $GLOBALS['wgExtensionCredits']['parserhook'][] = array(
                'path' => __FILE__,
                'name' => 'UserFunctions',
-               'version' => '2.6.1',
+               'version' => '2.7.0',
                'url' => 
'https://www.mediawiki.org/wiki/Extension:UserFunctions',
                'author' => array(
                        'Ross McClure',
@@ -59,7 +62,6 @@
 
        $GLOBALS['wgAutoloadClasses']['ExtUserFunctions'] = __DIR__ 
.'/UserFunctions_body.php';
        $GLOBALS['wgMessagesDirs']['UserFunctions'] = __DIR__ . '/i18n';
-       $GLOBALS['wgExtensionMessagesFiles']['UserFunctions'] = __DIR__ . 
'/UserFunctions.i18n.php';
        $GLOBALS['wgExtensionMessagesFiles']['UserFunctionsMagic'] = __DIR__ . 
'/UserFunctions.i18n.magic.php';
 
        $GLOBALS['wgHooks']['ParserFirstCallInit'][] = 
'wfRegisterUserFunctions';

-- 
To view, visit https://gerrit.wikimedia.org/r/367866
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I87660ba80f0c5fedd8bafd6b5d517707de1a7efa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserFunctions
Gerrit-Branch: master
Gerrit-Owner: Kghbln <[email protected]>

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

Reply via email to