From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- .../ResourceLoaderSpecialCharacterDataModule.php | 107 +++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php (limited to 'includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php') diff --git a/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php b/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php new file mode 100644 index 00000000..5c917091 --- /dev/null +++ b/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php @@ -0,0 +1,107 @@ +path ) ); + } + + /** + * @param ResourceLoaderContext $context + * @return string JavaScript code + */ + public function getScript( ResourceLoaderContext $context ) { + return Xml::encodeJsCall( + 'mw.language.setSpecialCharacters', + array( + $this->getData() + ), + ResourceLoader::inDebugMode() + ); + } + + /** + * @param ResourceLoaderContext $context + * @return int UNIX timestamp + */ + public function getModifiedTime( ResourceLoaderContext $context ) { + return static::safeFilemtime( $this->path ); + } + + /** + * @param ResourceLoaderContext $context + * @return string Hash + */ + public function getModifiedHash( ResourceLoaderContext $context ) { + return md5( serialize( $this->getData() ) ); + } + + /** + * @return array + */ + public function getDependencies() { + return array( 'mediawiki.language' ); + } + + /** + * @return array + */ + public function getMessages() { + return array( + 'special-characters-group-latin', + 'special-characters-group-latinextended', + 'special-characters-group-ipa', + 'special-characters-group-symbols', + 'special-characters-group-greek', + 'special-characters-group-cyrillic', + 'special-characters-group-arabic', + 'special-characters-group-arabicextended', + 'special-characters-group-persian', + 'special-characters-group-hebrew', + 'special-characters-group-bangla', + 'special-characters-group-tamil', + 'special-characters-group-telugu', + 'special-characters-group-sinhala', + 'special-characters-group-devanagari', + 'special-characters-group-gujarati', + 'special-characters-group-thai', + 'special-characters-group-lao', + 'special-characters-group-khmer', + 'special-characters-title-endash', + 'special-characters-title-emdash', + 'special-characters-title-minus' + ); + } +} -- cgit v1.2.3-54-g00ecf