mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-30 19:16:39 +00:00
3dc5e88842
Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: I492ddae3c3e9f81d551ea8b348b7148893f4f590
39 lines
882 B
PHP
39 lines
882 B
PHP
<?php
|
|
/**
|
|
* DiscussionTools installer hooks
|
|
*
|
|
* @file
|
|
* @ingroup Extensions
|
|
* @license MIT
|
|
*/
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Hooks;
|
|
|
|
use MediaWiki\Installer\DatabaseUpdater;
|
|
use MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook;
|
|
|
|
class InstallerHooks implements
|
|
LoadExtensionSchemaUpdatesHook
|
|
{
|
|
/**
|
|
* Implements the LoadExtensionSchemaUpdates hook, to create database tables when
|
|
* update.php runs
|
|
*
|
|
* @param DatabaseUpdater $updater
|
|
* @return bool|void
|
|
*/
|
|
public function onLoadExtensionSchemaUpdates( $updater ) {
|
|
$base = dirname( __DIR__ );
|
|
$type = $updater->getDB()->getType();
|
|
|
|
$updater->addExtensionTable(
|
|
'discussiontools_subscription',
|
|
"$base/../sql/$type/discussiontools_subscription.sql"
|
|
);
|
|
$updater->addExtensionTable(
|
|
'discussiontools_items',
|
|
"$base/../sql/$type/discussiontools_persistent.sql"
|
|
);
|
|
}
|
|
}
|