diff --git a/extension.json b/extension.json index d8373936..e8fe37c5 100644 --- a/extension.json +++ b/extension.json @@ -35,7 +35,7 @@ "thanks/*": "ThanksLogFormatter" }, "APIModules": { - "thank": "ApiRevThank" + "thank": "ApiCoreThank" }, "MessagesDirs": { "Thanks": [ @@ -47,10 +47,10 @@ }, "AutoloadClasses": { "ThanksHooks": "includes/ThanksHooks.php", - "EchoThanksPresentationModel": "includes/EchoThanksPresentationModel.php", + "EchoCoreThanksPresentationModel": "includes/EchoCoreThanksPresentationModel.php", "EchoFlowThanksPresentationModel": "includes/EchoFlowThanksPresentationModel.php", "ApiThank": "includes/ApiThank.php", - "ApiRevThank": "includes/ApiRevThank.php", + "ApiCoreThank": "includes/ApiCoreThank.php", "ApiFlowThank": "includes/ApiFlowThank.php", "ThanksLogFormatter": "includes/ThanksLogFormatter.php", "SpecialThanks": "includes/SpecialThanks.php" @@ -64,9 +64,9 @@ "mediawiki.api" ] }, - "ext.thanks.revthank": { + "ext.thanks.corethank": { "scripts": [ - "ext.thanks.revthank.js" + "ext.thanks.corethank.js" ], "messages": [ "thanks-thanked", @@ -85,6 +85,7 @@ "mediawiki.jqueryMsg", "mediawiki.api", "jquery.confirmable", + "jquery.cookie", "ext.thanks" ] }, diff --git a/includes/ApiRevThank.php b/includes/ApiCoreThank.php similarity index 99% rename from includes/ApiRevThank.php rename to includes/ApiCoreThank.php index 23475eb6..63576867 100644 --- a/includes/ApiRevThank.php +++ b/includes/ApiCoreThank.php @@ -5,7 +5,7 @@ * @ingroup API * @ingroup Extensions */ -class ApiRevThank extends ApiThank { +class ApiCoreThank extends ApiThank { public function execute() { $this->dieIfEchoNotInstalled(); diff --git a/includes/EchoThanksPresentationModel.php b/includes/EchoCoreThanksPresentationModel.php similarity index 96% rename from includes/EchoThanksPresentationModel.php rename to includes/EchoCoreThanksPresentationModel.php index 9139d6b9..6376163b 100644 --- a/includes/EchoThanksPresentationModel.php +++ b/includes/EchoCoreThanksPresentationModel.php @@ -1,5 +1,5 @@ event->getTitle(); } diff --git a/includes/ThanksHooks.php b/includes/ThanksHooks.php index 5ad9589e..17f14089 100644 --- a/includes/ThanksHooks.php +++ b/includes/ThanksHooks.php @@ -136,7 +136,7 @@ class ThanksHooks { && $context->getUser()->isLoggedIn() ) { // Load the module for the thank links - $context->getOutput()->addModules( [ 'ext.thanks.revthank' ] ); + $context->getOutput()->addModules( [ 'ext.thanks.corethank' ] ); $context->getOutput()->addJsConfigVars( 'thanks-confirmation-required', $wgThanksConfirmationRequired ); } @@ -157,7 +157,7 @@ class ThanksHooks { && $diff->getUser()->isLoggedIn() ) { // Load the module for the thank link - $diff->getOutput()->addModules( [ 'ext.thanks.revthank' ] ); + $diff->getOutput()->addModules( [ 'ext.thanks.corethank' ] ); $diff->getOutput()->addJsConfigVars( 'thanks-confirmation-required', $wgThanksConfirmationRequired ); } @@ -184,7 +184,7 @@ class ThanksHooks { 'category' => 'edit-thank', 'group' => 'positive', 'section' => 'message', - 'presentation-model' => 'EchoThanksPresentationModel', + 'presentation-model' => 'EchoCoreThanksPresentationModel', 'bundle' => [ 'web' => true, 'expandable' => true, diff --git a/modules/ext.thanks.revthank.js b/modules/ext.thanks.corethank.js similarity index 100% rename from modules/ext.thanks.revthank.js rename to modules/ext.thanks.corethank.js diff --git a/tests/phpunit/ApiRevThankIntegrationTest.php b/tests/phpunit/ApiCoreThankIntegrationTest.php similarity index 95% rename from tests/phpunit/ApiRevThankIntegrationTest.php rename to tests/phpunit/ApiCoreThankIntegrationTest.php index a19eba21..dca2cdfe 100644 --- a/tests/phpunit/ApiRevThankIntegrationTest.php +++ b/tests/phpunit/ApiCoreThankIntegrationTest.php @@ -3,7 +3,7 @@ /** * Integration tests for the Thanks API module * - * @covers ApiRevThank + * @covers ApiCoreThank * * @group Thanks * @group Database @@ -12,7 +12,7 @@ * * @author Addshore */ -class ApiRevThankIntegrationTest extends ApiTestCase { +class ApiCoreThankIntegrationTest extends ApiTestCase { /** * @var int filled in setUp diff --git a/tests/phpunit/ApiRevThankUnitTest.php b/tests/phpunit/ApiCoreThankUnitTest.php similarity index 95% rename from tests/phpunit/ApiRevThankUnitTest.php rename to tests/phpunit/ApiCoreThankUnitTest.php index 69a39a5e..7e3296ce 100644 --- a/tests/phpunit/ApiRevThankUnitTest.php +++ b/tests/phpunit/ApiCoreThankUnitTest.php @@ -8,12 +8,12 @@ * * @author Addshore */ -class ApiRevThankUnitTest extends MediaWikiTestCase { +class ApiCoreThankUnitTest extends MediaWikiTestCase { protected static $moduleName = 'thank'; protected function getModule() { - return new ApiRevThank( new ApiMain(), self::$moduleName ); + return new ApiCoreThank( new ApiMain(), self::$moduleName ); } /**