Kghbln has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/367862 )
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: Ided923a33630cb91fe4cd16bae555884c883f8a8 --- D StalkerLog.i18n.php M StalkerLog.php 2 files changed, 14 insertions(+), 44 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/StalkerLog refs/changes/62/367862/1 diff --git a/StalkerLog.i18n.php b/StalkerLog.i18n.php deleted file mode 100644 index 6396005..0000000 --- a/StalkerLog.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( 'wfJsonI18nShim4d4bbb4593873b16' ) ) { - function wfJsonI18nShim4d4bbb4593873b16( $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'][] = 'wfJsonI18nShim4d4bbb4593873b16'; -} diff --git a/StalkerLog.php b/StalkerLog.php index 6329ba1..a5d3371 100644 --- a/StalkerLog.php +++ b/StalkerLog.php @@ -12,25 +12,30 @@ * @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 is an extension to MediaWiki and cannot be run standalone.' ); +} + +// Display extension properties on MediaWiki. $wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'StalkerLog', - 'version' => '0.7.0', - 'url' => 'https://www.mediawiki.org/wiki/Extension:StalkerLog', - 'author' => '[mailto:innocentkil...@gmail.com Chad Horohoe]', + 'path' => __FILE__, + 'name' => 'StalkerLog', + 'version' => '0.8.0', + 'url' => 'https://www.mediawiki.org/wiki/Extension:StalkerLog', + 'author' => '[mailto:innocentkil...@gmail.com Chad Horohoe]', 'descriptionmsg' => 'stalkerlog-desc', - 'license-name' => 'GPL-2.0+' + 'license-name' => 'GPL-2.0+' ); -# Basic setup +// Basic setup $wgMessagesDirs['StalkerLog'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['StalkerLog'] = __DIR__ . '/StalkerLog.i18n.php'; $wgAvailableRights[] = 'stalkerlog-view-log'; $wgGroupPermissions['*']['stalkerlog-view-log'] = true; $wgHooks['UserLoginComplete'][] = 'wfStalkerLogin'; $wgHooks['UserLogoutComplete'][] = 'wfStalkerLogout'; -# Log setup +// Log setup $wgLogTypes[] = 'stalkerlog'; $wgLogHeaders['stalkerlog'] = 'stalkerlog-log-text'; $wgLogNames['stalkerlog'] = 'stalkerlog-log-type'; -- To view, visit https://gerrit.wikimedia.org/r/367862 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ided923a33630cb91fe4cd16bae555884c883f8a8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/StalkerLog Gerrit-Branch: master Gerrit-Owner: Kghbln <mediaw...@kghoffmeyer.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits