Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/91538
Change subject: Only show the log on the management wiki
......................................................................
Only show the log on the management wiki
bug: 56073
Change-Id: I41204649797d4c1e8a3127a65a943856f0160b87
---
M frontend/specialpages/SpecialMWOAuthListConsumers.php
1 file changed, 17 insertions(+), 15 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth
refs/changes/38/91538/1
diff --git a/frontend/specialpages/SpecialMWOAuthListConsumers.php
b/frontend/specialpages/SpecialMWOAuthListConsumers.php
index c30d847..2660beb 100644
--- a/frontend/specialpages/SpecialMWOAuthListConsumers.php
+++ b/frontend/specialpages/SpecialMWOAuthListConsumers.php
@@ -65,16 +65,17 @@
*/
protected function showConsumerInfo( $consumerKey ) {
$user = $this->getUser();
+ $out = $this->getOutput();
if ( !$consumerKey ) {
- $this->getOutput()->addWikiMsg(
'mwoauth-missing-consumer-key' );
+ $out->addWikiMsg( 'mwoauth-missing-consumer-key' );
}
$dbr = MWOAuthUtils::getCentralDB( DB_SLAVE );
$cmr = MWOAuthDAOAccessControl::wrap(
MWOAuthConsumer::newFromKey( $dbr, $consumerKey ),
$this->getContext() );
if ( !$cmr ) {
- $this->getOutput()->addWikiMsg(
'mwoauth-invalid-consumer-key' );
+ $out->addWikiMsg( 'mwoauth-invalid-consumer-key' );
return;
} elseif ( $cmr->get( 'deleted' ) && !$user->isAllowed(
'mwoauthviewsuppressed' ) ) {
throw new PermissionsError( 'mwoauthviewsuppressed' );
@@ -119,7 +120,7 @@
'mwoauthlistconsumers-callbackurl' => htmlspecialchars(
$cmr->get( 'callbackUrl' )
),
- 'mwoauthlistconsumers-grants' =>
$this->getOutput()->parseInline( $s ),
+ 'mwoauthlistconsumers-grants' => $out->parseInline( $s
),
);
$r = '';
@@ -127,19 +128,20 @@
$r .= '<p><b>' . $this->msg( $msg )->escaped() . '</b>:
' . $encValue . '</p>';
}
- $this->getOutput()->addHtml( $r );
+ $out->addHtml( $r );
- $out = $this->getOutput();
- // Show all of the status updates
- $logPage = new LogPage( 'mwoauthconsumer' );
- $out->addHTML( Xml::element( 'h2', null,
$logPage->getName()->text() ) );
- LogEventsList::showLogExtract( $out, 'mwoauthconsumer', '', '',
- array(
- 'conds' => array(
- 'ls_field' => 'OAuthConsumer', 'ls_value' =>
$cmr->get( 'consumerKey' ) ),
- 'flags' => LogEventsList::NO_EXTRA_USER_LINKS
- )
- );
+ if ( MWOAuthUtils::isCentralWiki() ) {
+ // Show all of the status updates
+ $logPage = new LogPage( 'mwoauthconsumer' );
+ $out->addHTML( Xml::element( 'h2', null,
$logPage->getName()->text() ) );
+ LogEventsList::showLogExtract( $out, 'mwoauthconsumer',
'', '',
+ array(
+ 'conds' => array(
+ 'ls_field' => 'OAuthConsumer',
'ls_value' => $cmr->get( 'consumerKey' ) ),
+ 'flags' =>
LogEventsList::NO_EXTRA_USER_LINKS
+ )
+ );
+ }
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/91538
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I41204649797d4c1e8a3127a65a943856f0160b87
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