Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/74685
Change subject: Enabled the schema updater hook
......................................................................
Enabled the schema updater hook
Change-Id: I56da84db459a38973f8271137bf5fe569f436d8a
---
M OAuth.php
M OAuth.setup.php
M backend/schema/MWOAuthUpdater.hooks.php
3 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth
refs/changes/85/74685/1
diff --git a/OAuth.php b/OAuth.php
index 0023574..e3177b2 100644
--- a/OAuth.php
+++ b/OAuth.php
@@ -52,6 +52,8 @@
MWOAuthUISetup::defineLogBasicDescription( $wgLogNames, $wgLogHeaders,
$wgFilterLogTypes );
MWOAuthUISetup::defineLogActionHandlers( $wgLogActions, $wgLogActionsHandlers
);
+# Basic hook handlers
+MWOAuthSetup::defineHookHandlers( $wgHooks );
# GUI-related hook handlers
MWOAuthUISetup::defineHookHandlers( $wgHooks );
# API-related hook handlers
diff --git a/OAuth.setup.php b/OAuth.setup.php
index eb1aef9..f2540d5 100644
--- a/OAuth.setup.php
+++ b/OAuth.setup.php
@@ -80,4 +80,12 @@
# Schema changes
$classes['MWOAuthUpdaterHooks'] =
"$schemaDir/MWOAuthUpdater.hooks.php";
}
+
+ /**
+ * @param array $hooks $wgHooks
+ * @return void
+ */
+ public static function defineHookHandlers( &$hooks ) {
+ $hooks['LoadExtensionSchemaUpdates'][] =
'MWOAuthUpdaterHooks::addSchemaUpdates';
+ }
}
diff --git a/backend/schema/MWOAuthUpdater.hooks.php
b/backend/schema/MWOAuthUpdater.hooks.php
index 388d50d..e70329e 100644
--- a/backend/schema/MWOAuthUpdater.hooks.php
+++ b/backend/schema/MWOAuthUpdater.hooks.php
@@ -3,7 +3,6 @@
* Class containing updater functions for an OAuth environment
*/
class MWOAuthUpdaterHooks {
-
/**
* @param DatabaseUpdater $updater
* @return bool
@@ -13,7 +12,7 @@
if ( $updater->getDB()->getType() == 'mysql' ) {
$base = "$base/mysql";
- // $updater->addExtensionTable( 'oauth_registration',
"$base/OAuth.sql" );
+ $updater->addExtensionTable(
'oauth_registered_consumer', "$base/OAuth.sql" );
} elseif ( $updater->getDB()->getType() == 'postgres' ) {
$base = "$base/postgres";
--
To view, visit https://gerrit.wikimedia.org/r/74685
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I56da84db459a38973f8271137bf5fe569f436d8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits