From e33b42882d9ed83d305220f0e570c8af924b5214 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Mon, 9 Apr 2018 00:19:34 -0700 Subject: [PATCH] Move EchoHooks into includes/ Change-Id: I6fe78ca2763f1d449198d9f4e9a0c4d9b8e081f7 --- extension.json | 2 +- Hooks.php => includes/EchoHooks.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename Hooks.php => includes/EchoHooks.php (99%) diff --git a/extension.json b/extension.json index a141526bd..17c4c4a63 100644 --- a/extension.json +++ b/extension.json @@ -954,7 +954,7 @@ "EchoForeignNotifications": "includes/ForeignNotifications.php", "EchoForeignPresentationModel": "includes/formatters/EchoForeignPresentationModel.php", "EchoForeignWikiRequest": "includes/ForeignWikiRequest.php", - "EchoHooks": "Hooks.php", + "EchoHooks": "includes/EchoHooks.php", "EchoHtmlDigestEmailFormatter": "includes/formatters/EchoHtmlDigestEmailFormatter.php", "EchoHtmlEmailFormatter": "includes/formatters/EchoHtmlEmailFormatter.php", "EchoIcon": "includes/formatters/EchoIcon.php", diff --git a/Hooks.php b/includes/EchoHooks.php similarity index 99% rename from Hooks.php rename to includes/EchoHooks.php index 042554db0..d1522b67b 100644 --- a/Hooks.php +++ b/includes/EchoHooks.php @@ -92,7 +92,7 @@ class EchoHooks { global $wgResourceModules; $testModuleBoilerplate = [ - 'localBasePath' => __DIR__, + 'localBasePath' => dirname( __DIR__ ), 'remoteExtPath' => 'Echo', ]; @@ -146,7 +146,7 @@ class EchoHooks { 'dependencies' => [ 'oojs' ], - 'localBasePath' => __DIR__ . '/modules', + 'localBasePath' => dirname( __DIR__ ) . '/modules', 'remoteExtPath' => 'Echo/modules', 'targets' => [ 'desktop', 'mobile' ], ]; @@ -191,7 +191,7 @@ class EchoHooks { // DatabaseUpdater does not support other databases, so skip return; } - $dir = __DIR__; + $dir = dirname( __DIR__ ); $baseSQLFile = "$dir/echo.sql"; $updater->addExtensionTable( 'echo_event', $baseSQLFile ); $updater->addExtensionTable( 'echo_email_batch', "$dir/db_patches/echo_email_batch.sql" );