From 8c33d926ffc27d87d4624d4301a53460a23927aa Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sat, 12 Nov 2011 09:55:28 +0000 Subject: [PATCH] Allow extensions to add post-update maintenance scripts --- includes/installer/DatabaseUpdater.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index ba51beb76e..a394f19fb2 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -190,6 +190,14 @@ abstract class DatabaseUpdater { public function addExtensionField( $tableName, $columnName, $sqlPath ) { $this->extensionUpdates[] = array( 'addField', $tableName, $columnName, $sqlPath, true ); } + + /** + * Add a maintenance script to be run after the database updates are complete + * @param $class string Name of a Maintenance subclass + */ + public function addPostDatabaseUpdateMaintenance( $class ) { + $this->postDatabaseUpdateMaintenance[] = $class; + } /** * Get the list of extension-defined updates -- 2.20.1