Index: branches/wmf-deployment-work/extensions/SecurePoll/includes/Auth.php |
— | — | @@ -201,10 +201,16 @@ |
202 | 202 | */ |
203 | 203 | function getUserParams( $user ) { |
204 | 204 | global $wgServer; |
| 205 | + if ( substr( $wgServer, 0, 5 ) == 'https' ) { |
| 206 | + global $site, $lang; |
| 207 | + $server = "$lang.$site.org"; |
| 208 | + } else { |
| 209 | + $server = preg_replace( '!.*/(.*)$!', '$1', $wgServer ); |
| 210 | + } |
205 | 211 | $params = array( |
206 | 212 | 'name' => $user->getName(), |
207 | 213 | 'type' => 'local', |
208 | | - 'domain' => preg_replace( '!.*/(.*)$!', '$1', $wgServer ), |
| 214 | + 'domain' => $server, |
209 | 215 | 'url' => $user->getUserPage()->getFullURL(), |
210 | 216 | 'properties' => array( |
211 | 217 | 'wiki' => wfWikiID(), |
Index: branches/wmf-deployment-work/extensions/SecurePoll/includes/VotePage.php |
— | — | @@ -242,6 +242,8 @@ |
243 | 243 | Xml::openElement( 'form', array( 'action' => $url, 'method' => 'post' ) ) . |
244 | 244 | Xml::hidden( 'token', SecurePoll_RemoteMWAuth::encodeToken( $wgUser->getToken() ) ) . |
245 | 245 | Xml::hidden( 'id', $wgUser->getId() ) . |
| 246 | + Xml::hidden( 'site', $GLOBALS['site'] ) . |
| 247 | + Xml::hidden( 'lang', $GLOBALS['lang'] ) . |
246 | 248 | Xml::submitButton( wfMsg( 'securepoll-jump' ) ) . |
247 | 249 | '</form>' |
248 | 250 | ); |