Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/263198
Change subject: Empty PHP entry point ...................................................................... Empty PHP entry point Change-Id: I58ed6d518abd735f9ab2d0fa8bc7e9a9b62eaf9f --- D Elastica.i18n.php M Elastica.php 2 files changed, 12 insertions(+), 57 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Elastica refs/changes/98/263198/1 diff --git a/Elastica.i18n.php b/Elastica.i18n.php deleted file mode 100644 index db61e5f..0000000 --- a/Elastica.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( 'wfJsonI18nShimf4d4d92a12ba4b65' ) ) { - function wfJsonI18nShimf4d4d92a12ba4b65( $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'][] = 'wfJsonI18nShimf4d4d92a12ba4b65'; -} diff --git a/Elastica.php b/Elastica.php index adfb30c..9b0d74e 100644 --- a/Elastica.php +++ b/Elastica.php @@ -19,25 +19,15 @@ * http://www.gnu.org/copyleft/gpl.html */ -$wgExtensionCredits['other'][] = array( - 'path' => __FILE__, - 'name' => 'Elastica', - 'author' => array( 'Nik Everett', 'Chad Horohoe' ), - 'descriptionmsg' => 'elastica-desc', - 'url' => 'https://www.mediawiki.org/wiki/Extension:Elastica', - 'version' => '1.3.0.0' -); - -/** - * Classes - */ -$wgAutoloadClasses['ElasticaConnection'] = __DIR__ . '/ElasticaConnection.php'; -$wgAutoloadClasses['ElasticaHttpTransportCloser'] = __DIR__ . '/ElasticaConnection.php'; -$wgAutoloadClasses['ElasticaHooks'] = __DIR__ . '/Elastica.hooks.php'; - -ElasticaHooks::onRegistration(); -/** - * i18n - */ -$wgMessagesDirs['Elastica'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['Elastica'] = __DIR__ . '/Elastica.i18n.php'; +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'Elastica' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['Elastica'] = __DIR__ . '/i18n'; + /* wfWarn( + 'Deprecated PHP entry point used for Elastica extension. Please use wfLoadExtension instead, ' . + 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + ); */ + return true; +} else { + die( 'This version of the Elastica extension requires MediaWiki 1.25+' ); +} -- To view, visit https://gerrit.wikimedia.org/r/263198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58ed6d518abd735f9ab2d0fa8bc7e9a9b62eaf9f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Elastica Gerrit-Branch: master Gerrit-Owner: Legoktm <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
