Wikinaut has submitted this change and it was merged.
Change subject: code cosmetics only
......................................................................
code cosmetics only
Change-Id: I184aa0d4e909ff37e022a05a59be4eea469c33fb
---
M OpenIDProvider.body.php
M SpecialOpenIDConvert.body.php
M SpecialOpenIDLogin.body.php
3 files changed, 16 insertions(+), 45 deletions(-)
Approvals:
Wikinaut: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/OpenIDProvider.body.php b/OpenIDProvider.body.php
index d7d31df..16582f8 100644
--- a/OpenIDProvider.body.php
+++ b/OpenIDProvider.body.php
@@ -37,7 +37,7 @@
* @param $classSize String Size for the openid_ class, either large or
small
* @return string
*/
- private function getButtonHTML( $classSize ) {
+ public function getButtonHTML( $classSize ) {
global $wgOpenIDShowProviderIcons;
if ( $wgOpenIDShowProviderIcons ) {
@@ -61,20 +61,6 @@
);
}
- }
-
- /**
- * @return string
- */
- public function getLargeButtonHTML() {
- return $this->getButtonHTML( 'large' );
- }
-
- /**
- * @return string
- */
- public function getSmallButtonHTML() {
- return $this->getButtonHTML( 'small' );
}
/**
@@ -105,36 +91,21 @@
)
);
- if ( strpos( $this->url, '{' ) === false ) {
-
- $inputHtml .= Html::element( 'input',
- array(
- 'type' => 'hidden',
- 'id' =>
'openid_provider_param_' . $this->providerName,
- 'size' => '25',
- 'value' => ''
- )
- );
-
- } else {
-
- $inputHtml .= Html::element( 'input',
- array(
- 'type' => 'text',
- 'id' =>
'openid_provider_param_' . $this->providerName,
- 'size' => '25',
- 'value' => ''
- )
- );
-
- }
+ $inputHtml .= Html::element( 'input',
+ array(
+ 'type' => ( strpos( $this->url, '{' )
=== false ) ? 'hidden' : 'text',
+ 'id' => 'openid_provider_param_' .
$this->providerName,
+ 'size' => '25',
+ 'value' => ''
+ )
+ );
}
$html = Html::rawElement( 'div',
array(
'id' => 'provider_form_' . $this->providerName,
- 'style' => ( $this->providerName == 'openid' ?
'display=inline-block' : 'display:none' ),
+ 'style' => ( $this->providerName == 'openid' )
? 'display=inline-block' : 'display:none',
),
Html::rawElement( 'div',
array(),
diff --git a/SpecialOpenIDConvert.body.php b/SpecialOpenIDConvert.body.php
index 9953a63..2cd2ad9 100644
--- a/SpecialOpenIDConvert.body.php
+++ b/SpecialOpenIDConvert.body.php
@@ -119,7 +119,7 @@
$largeButtonsHTML = '<div id="openid_large_providers">';
foreach ( OpenIDProvider::getLargeProviders() as $provider ) {
- $largeButtonsHTML .= $provider->getLargeButtonHTML();
+ $largeButtonsHTML .= $provider->getButtonHTML( 'large'
);
$formsHTML .= $provider->getLoginFormHTML();
}
@@ -132,7 +132,7 @@
$smallButtonsHTML .= '<div
id="openid_small_providers_icons">';
foreach ( OpenIDProvider::getSmallProviders() as
$provider ) {
- $smallButtonsHTML .=
$provider->getSmallButtonHTML();
+ $smallButtonsHTML .= $provider->getButtonHTML(
'small' );
$formsHTML .= $provider->getLoginFormHTML();
}
@@ -154,7 +154,7 @@
$break = false;
}
- $smallButtonsHTML .= '<li>' .
$provider->getSmallButtonHTML() . '</li>';
+ $smallButtonsHTML .= '<li>' .
$provider->getButtonHTML( 'small' ) . '</li>';
$formsHTML .= $provider->getLoginFormHTML();
$i++;
diff --git a/SpecialOpenIDLogin.body.php b/SpecialOpenIDLogin.body.php
index 15f1b8b..3c6cd4a 100644
--- a/SpecialOpenIDLogin.body.php
+++ b/SpecialOpenIDLogin.body.php
@@ -105,7 +105,7 @@
$largeButtonsHTML = '<div id="openid_large_providers">';
foreach ( OpenIDProvider::getLargeProviders() as $provider ) {
- $largeButtonsHTML .= $provider->getLargeButtonHTML();
+ $largeButtonsHTML .= $provider->getButtonHTML( 'large'
);
$formsHTML .= $provider->getLoginFormHTML();
}
$largeButtonsHTML .= '</div>';
@@ -114,7 +114,7 @@
if ( $wgOpenIDShowProviderIcons ) {
$smallButtonsHTML .= '<div
id="openid_small_providers_icons">';
foreach ( OpenIDProvider::getSmallProviders() as
$provider ) {
- $smallButtonsHTML .=
$provider->getSmallButtonHTML();
+ $smallButtonsHTML .= $provider->getButtonHTML(
'small' );
$formsHTML .= $provider->getLoginFormHTML();
}
$smallButtonsHTML .= '</div>';
@@ -131,7 +131,7 @@
$break = false;
}
- $smallButtonsHTML .= '<li>' .
$provider->getSmallButtonHTML() . '</li>';
+ $smallButtonsHTML .= '<li>' .
$provider->getButtonHTML( 'small' ) . '</li>';
$formsHTML .= $provider->getLoginFormHTML();
$i++;
--
To view, visit https://gerrit.wikimedia.org/r/65875
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I184aa0d4e909ff37e022a05a59be4eea469c33fb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/OpenID
Gerrit-Branch: master
Gerrit-Owner: Wikinaut <[email protected]>
Gerrit-Reviewer: Wikinaut <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits