Wikinaut has submitted this change and it was merged.
Change subject: Remove unused variables and globals
......................................................................
Remove unused variables and globals
bump to version 3.11 20130401
Also remove superfluous newlines, update some formatting and simplify two
if() statements.
Change-Id: Ie23d9cb0445bb113fddd7223af7858be97bf5890
---
M CHANGES
M OpenID.php
M SpecialOpenID.body.php
M SpecialOpenIDConvert.body.php
M SpecialOpenIDIdentifier.body.php
M SpecialOpenIDLogin.body.php
M SpecialOpenIDServer.body.php
M SpecialOpenIDXRDS.body.php
8 files changed, 23 insertions(+), 28 deletions(-)
Approvals:
Wikinaut: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/CHANGES b/CHANGES
index 02edf74..c12bd87 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
CHANGES
=======
+3.11 20130401 code cosmetics
3.10 20130318 renamed $wgOpenIDOnly to $wgOpenIDLoginOnly
3.09 20130318 hotfix typo $wgOpenIDOnlyClient vs. $wgOpenIDClientOnly
3.08 20130318 SpecialOpenIDIdentifier only shows the name for visiting user
diff --git a/OpenID.php b/OpenID.php
index 3fbcf83..875b428 100644
--- a/OpenID.php
+++ b/OpenID.php
@@ -29,7 +29,7 @@
exit( 1 );
}
-define( 'MEDIAWIKI_OPENID_VERSION', '3.10 20130318' );
+define( 'MEDIAWIKI_OPENID_VERSION', '3.11 20130401' );
$path = dirname( __FILE__ );
set_include_path( implode( PATH_SEPARATOR, array( $path ) ) . PATH_SEPARATOR .
get_include_path() );
diff --git a/SpecialOpenID.body.php b/SpecialOpenID.body.php
index 96c534f..6d721c0 100644
--- a/SpecialOpenID.body.php
+++ b/SpecialOpenID.body.php
@@ -20,6 +20,7 @@
*
* @file
* @author Evan Prodromou <[email protected]>
+ * @author Thomas Gries
* @ingroup Extensions
*/
diff --git a/SpecialOpenIDConvert.body.php b/SpecialOpenIDConvert.body.php
index c0a788a..b69ebac 100644
--- a/SpecialOpenIDConvert.body.php
+++ b/SpecialOpenIDConvert.body.php
@@ -20,6 +20,7 @@
*
* @file
* @author Evan Prodromou <[email protected]>
+ * @author Thomas Gries
* @ingroup Extensions
*/
diff --git a/SpecialOpenIDIdentifier.body.php b/SpecialOpenIDIdentifier.body.php
index d8270c4..48b8982 100644
--- a/SpecialOpenIDIdentifier.body.php
+++ b/SpecialOpenIDIdentifier.body.php
@@ -24,7 +24,6 @@
*/
class SpecialOpenIDIdentifier extends unlistedSpecialPage {
-
function __construct() {
parent::__construct( 'OpenIDIdentifier' );
}
@@ -39,7 +38,6 @@
}
self::showOpenIDIdentifier( User::newFromId( $par ), false,
true );
-
}
private static function isUser( $user ) {
@@ -47,21 +45,20 @@
}
/**
- * @param $user User
- * @param $delegate bool
+ * @param User $user
+ * @param bool $delegate
+ * @param bool $showSpecialPageText
*/
public static function showOpenIDIdentifier( $user, $delegate = false,
$showSpecialPageText = false ) {
global $wgOut, $wgUser, $wgOpenIDClientOnly,
$wgOpenIDShowUrlOnUserPage,
- $wgOpenIDAllowServingOpenIDUserAccounts,
$wgOpenIDIdentifiersURL;
+ $wgOpenIDAllowServingOpenIDUserAccounts;
// show the own OpenID Url as a subtitle on the user page
// but only for the user when visiting their own page
// and when the options say so
- if ( !self::isUser( $user ) ) {
- if ( $showSpecialPageText ) {
- $wgOut->addWikiMsg(
'openid-identifier-page-text-no-such-local-openid' );
- }
+ if ( !self::isUser( $user ) && $showSpecialPageText ) {
+ $wgOut->addWikiMsg(
'openid-identifier-page-text-no-such-local-openid' );
return;
}
@@ -69,11 +66,10 @@
# Add OpenID data if its allowed
if ( !$wgOpenIDClientOnly ) {
-
if ( !( count( $openid )
&& ( strlen( $openid[0]->uoi_openid ) != 0 )
- && !$wgOpenIDAllowServingOpenIDUserAccounts ) )
{
-
+ && !$wgOpenIDAllowServingOpenIDUserAccounts )
+ ) {
$serverTitle = SpecialPage::getTitleFor(
'OpenIDServer' );
$serverUrl = $serverTitle->getFullURL();
$wgOut->addLink( array( 'rel' =>
'openid.server', 'href' => $serverUrl ) );
@@ -93,8 +89,8 @@
if ( ( $user->getID() === $wgUser->getID() )
&& ( $user->getID() != 0 )
&& ( $wgOpenIDShowUrlOnUserPage === 'always'
- || ( ( $wgOpenIDShowUrlOnUserPage ===
'user' ) && !$wgUser->getOption( 'openid-hide-openid' ) ) ) ) {
-
+ || ( ( $wgOpenIDShowUrlOnUserPage ===
'user' ) && !$wgUser->getOption( 'openid-hide-openid' ) ) )
+ ) {
$wgOut->setSubtitle( "<span class='subpages'>" .
OpenIDHooks::getOpenIDSmallLogoUrlImageTag() .
SpecialOpenIDServer::getLocalIdentityLink( $wgUser ) .
@@ -103,17 +99,9 @@
if ( $showSpecialPageText ) {
$wgOut->addWikiMsg(
'openid-identifier-page-text-user', $wgUser->getName() );
}
-
- } else {
-
- if ( $showSpecialPageText ) {
- $wgOut->addWikiMsg(
'openid-identifier-page-text-different-user', $user->getID() );
- }
-
+ } elseif ( $showSpecialPageText ) {
+ $wgOut->addWikiMsg(
'openid-identifier-page-text-different-user', $user->getID() );
}
-
}
-
}
-
}
diff --git a/SpecialOpenIDLogin.body.php b/SpecialOpenIDLogin.body.php
index c182304..76e8221 100644
--- a/SpecialOpenIDLogin.body.php
+++ b/SpecialOpenIDLogin.body.php
@@ -20,6 +20,7 @@
*
* @file
* @author Evan Prodromou <[email protected]>
+ * @author Thomas Gries
* @ingroup Extensions
*/
@@ -163,6 +164,7 @@
*
* @param $openid String: OpenID url
* @param $sreg Array: options get from OpenID
+ * @param $ax Array: options get from OpenID
* @param $messagekey String or null: message name to display at the top
*/
function chooseNameForm( $openid, $sreg, $ax, $messagekey = null ) {
diff --git a/SpecialOpenIDServer.body.php b/SpecialOpenIDServer.body.php
index 78bff57..e0ee8f3 100644
--- a/SpecialOpenIDServer.body.php
+++ b/SpecialOpenIDServer.body.php
@@ -20,6 +20,7 @@
*
* @file
* @author Evan Prodromou <[email protected]>
+ * @author Thomas Gries
* @ingroup Extensions
*/
@@ -250,6 +251,7 @@
# respond with the authenticated local identity OpenID Url. Utility
/**
+ * @param $user
* @return getLocalIdentity
*/
static function getLocalIdentity( $user ) {
@@ -267,6 +269,7 @@
}
/**
+ * @param $user
* @return getLocalIdentityLink
*/
static function getLocalIdentityLink( $user ) {
@@ -287,8 +290,7 @@
# clarity.
function Check( $server, $request, $sreg, $imm = true ) {
-
- global $wgUser, $wgOut,
$wgOpenIDAllowServingOpenIDUserAccounts, $wgOpenIDIdentifiersURL;
+ global $wgUser, $wgOut, $wgOpenIDAllowServingOpenIDUserAccounts;
assert( isset( $wgUser ) && isset( $wgOut ) );
assert( isset( $server ) );
@@ -766,7 +768,6 @@
if ( !$user->checkPassword( $password ) ) {
return wfMessage( 'wrongpassword' )->text();
} else {
- $id = $user->getId();
$wgUser = $user;
wfSetupSession();
$wgUser->SetCookies();
diff --git a/SpecialOpenIDXRDS.body.php b/SpecialOpenIDXRDS.body.php
index f45bd82..78b4d16 100644
--- a/SpecialOpenIDXRDS.body.php
+++ b/SpecialOpenIDXRDS.body.php
@@ -20,6 +20,7 @@
*
* @file
* @author Evan Prodromou <[email protected]>
+ * @author Thomas Gries
* @ingroup Extensions
*/
--
To view, visit https://gerrit.wikimedia.org/r/56901
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie23d9cb0445bb113fddd7223af7858be97bf5890
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/OpenID
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Ryan Lane <[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