jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/374846 )
Change subject: Don't run updates in onLoadExtensionSchemaUpdates hook itself
......................................................................
Don't run updates in onLoadExtensionSchemaUpdates hook itself
Treat it like an extension update so it runs when the updater actually
is supposed to run.
Bug: T174520
Change-Id: I987c34672075b08f9e859bd3c0d864216fcdd4b4
---
M src/CognateHooks.php
M src/CognateUpdater.php
2 files changed, 16 insertions(+), 1 deletion(-)
Approvals:
WMDE-leszek: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/CognateHooks.php b/src/CognateHooks.php
index 9b6855f..865a08f 100644
--- a/src/CognateHooks.php
+++ b/src/CognateHooks.php
@@ -120,7 +120,9 @@
[ 'addTable', 'cognate_sites', __DIR__ .
'/../db/addCognateSites.sql', true ]
);
- $cognateUpdater->doUpdates( [ 'extensions' ] );
+ $updater->addExtensionUpdate(
+ [ [ CognateUpdater::class, 'realDoUpdates' ],
$cognateUpdater ]
+ );
return true;
}
diff --git a/src/CognateUpdater.php b/src/CognateUpdater.php
index 9c2bd90..23db08e 100644
--- a/src/CognateUpdater.php
+++ b/src/CognateUpdater.php
@@ -69,4 +69,17 @@
// not used but is abstract and must be implemented
}
+ /**
+ * Really do the updates we care about
+ *
+ * @param DatabaseUpdater $updater
+ * @param DatabaseUpdater $cognateUpdater
+ */
+ public static function realDoUpdates(
+ DatabaseUpdater $updater,
+ DatabaseUpdater $cognateUpdater
+ ) {
+ $cognateUpdater->doUpdates( [ 'extensions' ] );
+ }
+
}
--
To view, visit https://gerrit.wikimedia.org/r/374846
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I987c34672075b08f9e859bd3c0d864216fcdd4b4
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Cognate
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: WMDE-Fisch <[email protected]>
Gerrit-Reviewer: WMDE-leszek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits