jenkins-bot has submitted this change and it was merged. Change subject: Convert to extension.json ......................................................................
Convert to extension.json Clear php entry point. Change-Id: I2562e2976955eba1f0cdab88b9ddb7675e065c19 --- M GoogleAPIClient.php A extension.json 2 files changed, 41 insertions(+), 47 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/GoogleAPIClient.php b/GoogleAPIClient.php index 42d9c23..ab3dc2d 100644 --- a/GoogleAPIClient.php +++ b/GoogleAPIClient.php @@ -1,49 +1,14 @@ <?php - /** - GoogleAPIClient License - Copyright (c) 2014 Florian Schmidt - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - */ - - if ( !defined( 'MEDIAWIKI' ) ) { - die( 'This is an extension for Mediawiki and can not run standalone.' ); - } - - $wgExtensionCredits['other'][] = array( - 'path' => __FILE__, - 'name' => 'GoogleAPIClient', - 'author' => 'Florian Schmidt', - 'url' => 'https://www.mediawiki.org/wiki/Extension:GoogleAPIClient', - 'descriptionmsg' => 'googleapiclient-desc', - 'version' => '01.0', - 'license-name' => "MIT/Apache", - ); - - $dir = __DIR__; - - // Load message file - $wgMessagesDirs['GoogleAPIClient'] = $dir . '/i18n'; - - // Autoload Classes - $wgAutoloadClasses[ 'Google_Client' ] = $dir . '/lib/src/Google/Client.php'; - $wgAutoloadClasses[ 'GoogleAPIClientHooks' ] = $dir . '/GoogleAPIClient.hooks.php'; - - // Hook handlers - $wgHooks['UnitTestsList'][] = 'GoogleAPIClientHooks::onUnitTestsList'; +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'GoogleAPIClient' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['GoogleAPIClient'] = __DIR__ . '/i18n'; + /* wfWarn( + 'Deprecated PHP entry point used for GoogleAPIClient extension. Please use wfLoadExtension instead, ' . + 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + ); */ + return true; +} else { + die( 'This version of the GoogleAPIClient extension requires MediaWiki 1.25+' ); +} diff --git a/extension.json b/extension.json new file mode 100644 index 0000000..434d3ee --- /dev/null +++ b/extension.json @@ -0,0 +1,29 @@ +{ + "name": "GoogleAPIClient", + "version": "0.1.1", + "author": [ + "Florian Schmidt" + ], + "url": "https://www.mediawiki.org/wiki/Extension:GoogleAPIClient", + "descriptionmsg": "googleapiclient-desc", + "license-name": "MIT", + "type": "other", + "requires": { + "MediaWiki": ">= 1.25.0" + }, + "MessagesDirs": { + "GoogleAPIClient": [ + "i18n" + ] + }, + "Hooks": { + "UnitTestsList": [ + "GoogleAPIClientHooks::onUnitTestsList" + ] + }, + "AutoloadClasses": { + "Google_Client": "lib/src/Google/Client.php", + "GoogleAPIClientHooks": "GoogleAPIClient.hooks.php" + }, + "manifest_version": 1 +} -- To view, visit https://gerrit.wikimedia.org/r/247189 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2562e2976955eba1f0cdab88b9ddb7675e065c19 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GoogleAPIClient Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits