From: Roan Kattouw Date: Sat, 12 Nov 2011 09:55:28 +0000 (+0000) Subject: Allow extensions to add post-update maintenance scripts X-Git-Tag: 1.31.0-rc.0~26547 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=8c33d926ffc27d87d4624d4301a53460a23927aa;p=lhc%2Fweb%2Fwiklou.git Allow extensions to add post-update maintenance scripts --- 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