jenkins-bot has submitted this change and it was merged.
Change subject: renamed $wgOpenIDClientOnly; moved most important parameters to
top of OpenID.php
......................................................................
renamed $wgOpenIDClientOnly; moved most important parameters to top of
OpenID.php
version 3.12 20130402
renamed $wgOpenIDClientOnly to $wgOpenIDClientAndAlsoProvider and
changed the logic accordingly
moved most important parameters to top of OpenID.php
Change-Id: If6e00410ff09d9e35a36bf1416731033bef12f5a
---
M CHANGES
M OpenID.hooks.php
M OpenID.php
M SpecialOpenIDDashboard.body.php
M SpecialOpenIDIdentifier.body.php
M SpecialOpenIDServer.body.php
M SpecialOpenIDXRDS.body.php
7 files changed, 45 insertions(+), 46 deletions(-)
Approvals:
Wikinaut: Checked; Looks good to me, approved
jenkins-bot: Verified
diff --git a/CHANGES b/CHANGES
index c12bd87..497e475 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
CHANGES
=======
+3.12 20130402 breaking change renamed $wgOpenIDClientOnly to
$wgOpenIDClientAndAlsoProvider
+ and inverting its logic accordingly
3.11 20130401 code cosmetics
3.10 20130318 renamed $wgOpenIDOnly to $wgOpenIDLoginOnly
3.09 20130318 hotfix typo $wgOpenIDOnlyClient vs. $wgOpenIDClientOnly
diff --git a/OpenID.hooks.php b/OpenID.hooks.php
index 43bf548..aafa5be 100644
--- a/OpenID.hooks.php
+++ b/OpenID.hooks.php
@@ -18,7 +18,7 @@
class OpenIDHooks {
public static function onSpecialPage_initList( &$list ) {
- global $wgOpenIDLoginOnly, $wgOpenIDClientOnly,
$wgSpecialPageGroups, $wgOpenIDSmallLogoUrl;
+ global $wgOpenIDLoginOnly, $wgOpenIDClientAndAlsoProvider,
$wgSpecialPageGroups, $wgOpenIDSmallLogoUrl;
$wgOpenIDSmallLogoUrl = self::getOpenIDSmallLogoUrl();
@@ -33,7 +33,7 @@
# Special pages are added at global scope;
# remove server-related ones if client-only flag is set
$addList = array( 'Login', 'Convert', 'Dashboard', 'Identifier'
);
- if ( !$wgOpenIDClientOnly ) {
+ if ( $wgOpenIDClientAndAlsoProvider ) {
$addList[] = 'Server';
$addList[] = 'XRDS';
}
@@ -263,9 +263,9 @@
*/
public static function onGetPreferences( $user, &$preferences ) {
global $wgOpenIDShowUrlOnUserPage, $wgHiddenPrefs,
- $wgAuth, $wgUser, $wgLang, $wgOpenIDClientOnly;
+ $wgAuth, $wgUser, $wgLang,
$wgOpenIDClientAndAlsoProvider;
- if ( !$wgOpenIDClientOnly ) {
+ if ( $wgOpenIDClientAndAlsoProvider ) {
switch ( $wgOpenIDShowUrlOnUserPage ) {
@@ -337,7 +337,7 @@
'type' => 'hidden',
);
- if ( !$wgOpenIDClientOnly ) {
+ if ( $wgOpenIDClientAndAlsoProvider ) {
$preferences['openid-your-openid'] =
array(
diff --git a/OpenID.php b/OpenID.php
index 875b428..8487f75 100644
--- a/OpenID.php
+++ b/OpenID.php
@@ -29,7 +29,7 @@
exit( 1 );
}
-define( 'MEDIAWIKI_OPENID_VERSION', '3.11 20130401' );
+define( 'MEDIAWIKI_OPENID_VERSION', '3.12 20130402' );
$path = dirname( __FILE__ );
set_include_path( implode( PATH_SEPARATOR, array( $path ) ) . PATH_SEPARATOR .
get_include_path() );
@@ -37,8 +37,31 @@
# CONFIGURATION VARIABLES
/**
- * Whether to hide the "Login with OpenID link" link; set to true if you
already
- * have this link in your skin.
+ * Only allow login with OpenID.
+ * Default: true
+ */
+$wgOpenIDLoginOnly = true;
+
+/**
+ * If true, user accounts on this wiki can be used as OpenIDs on other
+ * sites. This is called "OpenID Provider" (or "OpenID Server") mode.
+ *
+ * @deprecated $wgOpenIDClientOnly since E:OpenID v3.12. Use
$wgOpenIDClientAndAlsoProvider with inverted logic instead
+ */
+$wgOpenIDClientAndAlsoProvider = true;
+
+/**
+ * If true, users can use their OpenID identity provided by this site A
+ * as OpenID for logins to other sites B
+ * even when users logged in on site A with OpenID.
+ *
+ * Some users might want to do that for vanity purposes or whatever.
+ */
+$wgOpenIDAllowServingOpenIDUserAccounts = true;
+
+/**
+ * Whether to hide the "Login with OpenID link" link:
+ * set to true if you already have this link in your skin.
*/
$wgOpenIDHideOpenIDLoginLink = false;
@@ -49,8 +72,8 @@
$wgOpenIDSmallLogoUrl = false;
/**
- * Whether to show the OpenID identity URL on a user's home page. Possible
- * values are 'always', 'never' (default), or 'user'.
+ * Whether to show the OpenID identity URL on a user's home page.
+ * Possible values are 'always', 'never' (default), or 'user'.
* 'user' lets the user decide in their preferences.
*/
$wgOpenIDShowUrlOnUserPage = 'user';
@@ -188,38 +211,12 @@
*/
$wgOpenIDCookieExpiration = 365 * 24 * 60 * 60;
-/**
- * Only allow login with OpenID.
- * Default: true
- */
-$wgOpenIDLoginOnly = true;
-
-/**
- * If true, user accounts on this wiki *cannot* be used as OpenIDs on other
- * sites.
- */
-$wgOpenIDClientOnly = false;
-
/*
* The fractional part after /Special:OpenIDServer/
* when the server shall show the selection (login) form
*
*/
$wgOpenIDIdentifierSelect = "id";
-
-/**
- * Allow to use User pages as OpenIDs even if user is using OpenID already
- *
- * If true, users can use their user page URLs of this site A as OpenID
- * on another site B even if user is using OpenID on A already.
- *
- * Some users might want to do that for vanity purposes or whatever.
- *
- * https://bugzilla.wikimedia.org/show_bug.cgi?id=18635
- * If false, prevent serving OpenID accounts (TODO list item; done)
- *
- */
-$wgOpenIDAllowServingOpenIDUserAccounts = true;
/**
* When merging accounts with the UserMerge and Delete extension,
diff --git a/SpecialOpenIDDashboard.body.php b/SpecialOpenIDDashboard.body.php
index f67a97b..23239ed 100644
--- a/SpecialOpenIDDashboard.body.php
+++ b/SpecialOpenIDDashboard.body.php
@@ -68,7 +68,7 @@
global $wgOpenIDProposeUsernameFromSREG;
global $wgOpenIDAllowAutomaticUsername;
global $wgOpenIDLoginOnly;
- global $wgOpenIDClientOnly;
+ global $wgOpenIDClientAndAlsoProvider;
global $wgOpenIDAllowServingOpenIDUserAccounts;
global $wgOpenIDShowProviderIcons;
@@ -94,7 +94,7 @@
$out = $this->show( 'OpenID ' . wfMessage(
'version-software-version' )->text(), MEDIAWIKI_OPENID_VERSION );
$out .= $this->show( 'MediaWiki ' . wfMessage(
'version-software-version' )->text(), SpecialVersion::getVersion() );
$out .= $this->show( '$wgOpenIDLoginOnly', $wgOpenIDLoginOnly );
- $out .= $this->show( '$wgOpenIDClientOnly', $wgOpenIDClientOnly
);
+ $out .= $this->show( '$wgOpenIDClientAndAlsoProvider',
$wgOpenIDClientAndProviderMode );
$out .= $this->show( '$wgOpenIDAllowServingOpenIDUserAccounts',
$wgOpenIDAllowServingOpenIDUserAccounts );
$out .= $this->show( '$wgOpenIDTrustEmailAddress',
$wgOpenIDTrustEmailAddress );
$out .= $this->show( '$wgOpenIDAllowExistingAccountSelection',
$wgOpenIDAllowExistingAccountSelection );
diff --git a/SpecialOpenIDIdentifier.body.php b/SpecialOpenIDIdentifier.body.php
index 48b8982..0f6152f 100644
--- a/SpecialOpenIDIdentifier.body.php
+++ b/SpecialOpenIDIdentifier.body.php
@@ -29,10 +29,10 @@
}
function execute( $par ) {
- global $wgOpenIDClientOnly, $wgOut;
+ global $wgOpenIDClientAndAlsoProvider, $wgOut;
$this->setHeaders();
- if ( $wgOpenIDClientOnly ) {
+ if ( !$wgOpenIDClientAndAlsoProvider ) {
$wgOut->showErrorPage( 'openiderror',
'openidclientonlytext' );
return;
}
@@ -50,7 +50,7 @@
* @param bool $showSpecialPageText
*/
public static function showOpenIDIdentifier( $user, $delegate = false,
$showSpecialPageText = false ) {
- global $wgOut, $wgUser, $wgOpenIDClientOnly,
$wgOpenIDShowUrlOnUserPage,
+ global $wgOut, $wgUser, $wgOpenIDClientAndAlsoProvider,
$wgOpenIDShowUrlOnUserPage,
$wgOpenIDAllowServingOpenIDUserAccounts;
// show the own OpenID Url as a subtitle on the user page
@@ -65,7 +65,7 @@
$openid = SpecialOpenID::getUserOpenIDInformation( $user );
# Add OpenID data if its allowed
- if ( !$wgOpenIDClientOnly ) {
+ if ( $wgOpenIDClientAndAlsoProvider ) {
if ( !( count( $openid )
&& ( strlen( $openid[0]->uoi_openid ) != 0 )
&& !$wgOpenIDAllowServingOpenIDUserAccounts )
diff --git a/SpecialOpenIDServer.body.php b/SpecialOpenIDServer.body.php
index e0ee8f3..67cda37 100644
--- a/SpecialOpenIDServer.body.php
+++ b/SpecialOpenIDServer.body.php
@@ -54,7 +54,7 @@
}
function execute( $par ) {
- global $wgOut, $wgOpenIDClientOnly, $wgOpenIDIdentifierSelect;
+ global $wgOut, $wgOpenIDClientAndAlsoProvider,
$wgOpenIDIdentifierSelect;
$this->setHeaders();
@@ -62,7 +62,7 @@
# Note: special page is un-registered if this flag is set,
# so it'd be unusual to get here.
- if ( $wgOpenIDClientOnly ) {
+ if ( !$wgOpenIDClientAndAlsoProvider ) {
$wgOut->showErrorPage( 'openiderror',
'openidclientonlytext' );
return;
}
diff --git a/SpecialOpenIDXRDS.body.php b/SpecialOpenIDXRDS.body.php
index 78b4d16..9e3904f 100644
--- a/SpecialOpenIDXRDS.body.php
+++ b/SpecialOpenIDXRDS.body.php
@@ -40,13 +40,13 @@
# $par is a user name
function execute( $par ) {
- global $wgOut, $wgOpenIDClientOnly;
+ global $wgOut, $wgOpenIDClientAndAlsoProvider;
# No server functionality if this site is only a client
# Note: special page is un-registered if this flag is set,
# so it'd be unusual to get here.
- if ( $wgOpenIDClientOnly ) {
+ if ( !$wgOpenIDClientAndAlsoProvider ) {
wfHttpError( 404, "Not Found", wfMessage(
'openidclientonlytext' )->text() );
return;
}
--
To view, visit https://gerrit.wikimedia.org/r/57044
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If6e00410ff09d9e35a36bf1416731033bef12f5a
Gerrit-PatchSet: 7
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