2021-01-30 19:35:44 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* DiscussionTools installer hooks
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @ingroup Extensions
|
|
|
|
* @license MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Hooks;
|
|
|
|
|
|
|
|
use 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"
|
|
|
|
);
|
2022-02-16 23:29:10 +00:00
|
|
|
$updater->addExtensionTable(
|
|
|
|
'discussiontools_items',
|
|
|
|
"$base/../sql/$type/discussiontools_persistent.sql"
|
|
|
|
);
|
2021-01-30 19:35:44 +00:00
|
|
|
}
|
|
|
|
}
|