mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RSS
synced 2024-11-23 23:34:07 +00:00
v2.25.1 - Remove old compatibility shims
Change-Id: Ic3a92f89fb51d7b674b1de6d9b5f44afa7bf02db
This commit is contained in:
parent
643ad126bd
commit
f53c0a68b2
35
RSS.i18n.php
35
RSS.i18n.php
|
@ -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( 'wfJsonI18nShimd95126abe3f4c4cf' ) ) {
|
||||
function wfJsonI18nShimd95126abe3f4c4cf( $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'][] = 'wfJsonI18nShimd95126abe3f4c4cf';
|
||||
}
|
13
RSS.php
13
RSS.php
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
if ( function_exists( 'wfLoadExtension' ) ) {
|
||||
wfLoadExtension( 'RSS' );
|
||||
// Keep i18n globals so mergeMessageFileList.php doesn't break
|
||||
$wgMessagesDirs['RSS'] = __DIR__ . '/i18n';
|
||||
/*wfWarn(
|
||||
'Deprecated PHP entry point used for RSS extension. Please use wfLoadExtension instead, ' .
|
||||
'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
|
||||
);*/
|
||||
return;
|
||||
} else {
|
||||
die( 'This version of the RSS extension requires MediaWiki 1.25+' );
|
||||
}
|
|
@ -14,7 +14,7 @@
|
|||
"Jeroen De Dauw",
|
||||
"Mark A. Hershberger"
|
||||
],
|
||||
"version": "2.25.0",
|
||||
"version": "2.25.1",
|
||||
"url": "https://www.mediawiki.org/wiki/Extension:RSS",
|
||||
"descriptionmsg": "rss-desc",
|
||||
"type": "parserhook",
|
||||
|
@ -44,7 +44,7 @@
|
|||
"RSSNamespaces": null,
|
||||
"RSSUrlWhitelist": [],
|
||||
"RSSUrlNumberOfAllowedRedirects": 0,
|
||||
"RSSUserAgent": "MediaWikiRSS/2.25.0 (+http://www.mediawiki.org/wiki/Extension:RSS) / MediaWiki RSS extension",
|
||||
"RSSUserAgent": "MediaWikiRSS/2.25.1 (+https://www.mediawiki.org/wiki/Extension:RSS) / MediaWiki RSS extension",
|
||||
"RSSProxy": false,
|
||||
"RSSDateDefaultFormat": "Y-m-d H:i:s",
|
||||
"RSSItemMaxLength": false,
|
||||
|
|
Loading…
Reference in a new issue