r48993 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48992‎ | r48993 | r48994 >
Date:11:34, 29 March 2009
Author:werdna
Status:ok
Tags:
Comment:
Fix regression whereby you were shown an error message after submitting GlobalGroupMembership form
Modified paths:
  • /trunk/extensions/CentralAuth/SpecialGlobalGroupMembership.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -105,7 +105,7 @@
106106
107107 global $wgOut;
108108
109 - $url = $this->getTitle( $this->mTarget )->getFullURL();
 109+ $url = $this->getSuccessURL();
110110 $wgOut->redirect( $url );
111111 return;
112112 }
@@ -117,6 +117,10 @@
118118 $this->editUserGroupsForm( $this->mTarget );
119119 }
120120 }
 121+
 122+ function getSuccessURL() {
 123+ return $this->getTitle( $this->mTarget )->getFullURL();
 124+ }
121125
122126 /**
123127 * Save user groups changes in the database.
Index: trunk/extensions/CentralAuth/SpecialGlobalGroupMembership.php
@@ -15,6 +15,13 @@
1616 global $wgUser;
1717 $this->mGlobalUser = CentralAuthUser::getInstance( $wgUser );
1818 }
 19+
 20+ function getSuccessURL() {
 21+ global $wgRequest;
 22+ $knownWikis = $this->mGlobalUser->listAttached();
 23+ $title = $this->getTitle( $this->mTarget );
 24+ return $title->getFullURL( 'wpKnownWiki='.urlencode( $knownWikis[0] ) );
 25+ }
1926
2027 /**
2128 * Output a form to allow searching for a user

Follow-up revisions

RevisionCommit summaryAuthorDate
r50095* Backported r48993: fixes fatal error in CentralAuth.tstarling06:31, 1 May 2009

Status & tagging log