MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394738 )
Change subject: Clean up this extension ...................................................................... Clean up this extension * Remove old PHP entry point * Remove unneded inclusion guard * Move code to includes * Explicitly specify required MW version Change-Id: I204a63fcd7bd7a068d513dd195a32604f30d9401 --- D Score.php M extension.json R includes/Score.php R includes/ScoreException.php R includes/ScoreHooks.php 5 files changed, 6 insertions(+), 48 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Score refs/changes/38/394738/1 diff --git a/Score.php b/Score.php deleted file mode 100644 index 6ec120c..0000000 --- a/Score.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/* - Score, a MediaWiki extension for rendering musical scores with LilyPond. - Copyright © 2011 Alexander Klauer - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - - To contact the author: - <[email protected]> - http://en.wikisource.org/wiki/User_talk:GrafZahl - https://github.com/TheCount/score - - */ -/** - * Score extension - * - * @file - * @ingroup Extensions - * - * @author Alexander Klauer <[email protected]> - * @license GPL v3 or later - * @version 0.2 - */ - -if ( function_exists( 'wfLoadExtension' ) ) { - wfLoadExtension( 'Score' ); - $wgMessagesDirs['Score'] = __DIR__ . '/i18n'; -} else { - die( 'This version of the Score extension requires MediaWiki 1.25+' ); -} diff --git a/extension.json b/extension.json index 37ea627..64d1677 100644 --- a/extension.json +++ b/extension.json @@ -6,15 +6,18 @@ "descriptionmsg": "score-desc", "license-name": "GPL-3.0+", "type": "parserhooks", + "requires": { + "MediaWiki": ">= 1.31.0" + }, "MessagesDirs": { "Score": [ "i18n" ] }, "AutoloadClasses": { - "Score": "Score.body.php", - "ScoreException": "ScoreException.php", - "ScoreHooks": "Score.hooks.php" + "Score": "includes/Score.php", + "ScoreException": "includes/ScoreException.php", + "ScoreHooks": "includes/ScoreHooks.php" }, "ResourceModules": { "ext.score.visualEditor": { diff --git a/Score.body.php b/includes/Score.php similarity index 98% rename from Score.body.php rename to includes/Score.php index 448bd45..7e73548 100644 --- a/Score.body.php +++ b/includes/Score.php @@ -25,10 +25,6 @@ use MediaWiki\Shell\Shell; -if ( !defined( 'MEDIAWIKI' ) ) { - die( "This file cannot be run standalone.\n" ); -} - /** * Score class. */ diff --git a/ScoreException.php b/includes/ScoreException.php similarity index 100% rename from ScoreException.php rename to includes/ScoreException.php diff --git a/Score.hooks.php b/includes/ScoreHooks.php similarity index 100% rename from Score.hooks.php rename to includes/ScoreHooks.php -- To view, visit https://gerrit.wikimedia.org/r/394738 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I204a63fcd7bd7a068d513dd195a32604f30d9401 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Score Gerrit-Branch: master Gerrit-Owner: MaxSem <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
