jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/368130 )
Change subject: Do some maintenance ...................................................................... Do some maintenance * Remove I18n php shim * Provide license label * Extend author's array * Update RELEASE-NOTES * Bump version Bug:T123943 Bug:T168353 Change-Id: I2a50acedf9843131f29f99934ff07b4ebf4bbbeb --- M RELEASE-NOTES D RegexFun.i18n.php M RegexFun.php 3 files changed, 32 insertions(+), 48 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 262c93d..786c14f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -1,7 +1,20 @@ Changelog: ========== - * (git HEAD) -- Version 1.1 + * July 27, 2017 -- Version 1.3.0 + - Removes i18n shim for php + - Provides license label + - Extends author's array + - Use Parser::SFH_OBJECT_ARGS class const instead of the global const + - Fixes case of Html class since it gave a fatal when using $wgAutoloadAttemptLowercase = false + - Dropped compatibility with MediaWiki below 1.23 + + * April 2, 2014 -- Version 1.2.0 + - Migrated I18n to json files + + * August 12, 2013 -- Version 1.1.0 + - Fixed a security issue + - Migrated to using Message class now - '#regex' in replace mode with 'e' flag doesn't require escaped replacement string anymore. Instead of something like "{{((}}#if:$2{{!}}$2{{!}}$1{{))}}", "{{#if:$2|$2|$1}}" can be used. - '#regex' with 'e' flag now first escapes matches before putting them into the back-references diff --git a/RegexFun.i18n.php b/RegexFun.i18n.php deleted file mode 100644 index 91703f1..0000000 --- a/RegexFun.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( 'wfJsonI18nShim3e95bb5b7771bdf4' ) ) { - function wfJsonI18nShim3e95bb5b7771bdf4( $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'][] = 'wfJsonI18nShim3e95bb5b7771bdf4'; -} diff --git a/RegexFun.php b/RegexFun.php index a0d95c3..a8eb7d7 100644 --- a/RegexFun.php +++ b/RegexFun.php @@ -3,8 +3,9 @@ * 'Regex Fun' is a MediaWiki extension which adds parser functions for performing regular * expression searches and replacements. * - * Documentation: http://www.mediawiki.org/wiki/Extension:Regex_Fun - * Support: http://www.mediawiki.org/wiki/Extension_talk:Regex_Fun + * Documentation: https://www.mediawiki.org/wiki/Extension:Regex_Fun + * Support: https://www.mediawiki.org/wiki/Extension_talk:Regex_Fun + * Source code: https://phabricator.wikimedia.org/diffusion/ERXU/ * * @license: ISC license * @author: Daniel Werner < danwe...@web.de > @@ -13,22 +14,27 @@ * @ingroup RegexFun */ -if ( ! defined( 'MEDIAWIKI' ) ) { die( ); } +// entry point: +if ( !defined( 'MEDIAWIKI' ) ) { + die( 'This is an extension to MediaWiki and cannot be run standalone.' ); +} -/**** extension info ****/ - +// extension info: $wgExtensionCredits['parserhook'][] = array( - 'path' => __FILE__, - 'name' => 'Regex Fun', + 'path' => __FILE__, + 'name' => 'Regex Fun', 'descriptionmsg' => 'regexfun-desc', - 'version' => ExtRegexFun::VERSION, - 'author' => '[http://www.mediawiki.org/wiki/User:Danwe Daniel Werner]', - 'url' => 'https://www.mediawiki.org/wiki/Extension:Regex_Fun', + 'version' => ExtRegexFun::VERSION, + 'author' => array( + '[https://www.mediawiki.org/wiki/User:Danwe Daniel Werner]', + '...' + ), + 'url' => 'https://www.mediawiki.org/wiki/Extension:Regex_Fun', + 'license-name' => 'ISC' ); // language files: $wgMessagesDirs['RegexFun'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['RegexFun' ] = ExtRegexFun::getDir() . '/RegexFun.i18n.php'; $wgExtensionMessagesFiles['RegexFunMagic'] = ExtRegexFun::getDir() . '/RegexFun.i18n.magic.php'; // hooks registration: @@ -55,7 +61,7 @@ * * @var string */ - const VERSION = '1.2.0'; + const VERSION = '1.3.0'; /** * Sets up parser functions -- To view, visit https://gerrit.wikimedia.org/r/368130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a50acedf9843131f29f99934ff07b4ebf4bbbeb Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/RegexFun Gerrit-Branch: master Gerrit-Owner: Kghbln <mediaw...@kghoffmeyer.de> Gerrit-Reviewer: Daniel Werner <daniel.a.r.wer...@gmail.com> Gerrit-Reviewer: Reedy <re...@wikimedia.org> Gerrit-Reviewer: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits