Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18 |
— | — | @@ -212,6 +212,9 @@ |
213 | 213 | User:getDefaultOptions(). |
214 | 214 | * (bug 30722) Add an identity collation that sorts things based on what the |
215 | 215 | unicode code point is (aka pre-1.17 behaviour) |
| 216 | +* (bug 31293) If Special:Userlogin is loaded over HTTPS, display |
| 217 | + MediaWiki:loginend-https instead of MediaWiki:loginend, if it's not empty. |
| 218 | + Same for signupend on the account creation page. |
216 | 219 | |
217 | 220 | === Bug fixes in 1.18 === |
218 | 221 | * mw.util.getScript has been implemented (like wfScript in GlobalFunctions.php) |
Property changes on: branches/REL1_18/phase3/RELEASE-NOTES-1.18 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
219 | 222 | Merged /trunk/phase3/RELEASE-NOTES-1.18:r97806,97895,98193-98194,98237,98502,98610,98656,98707,98713,98716,98718-98720 |
Index: branches/REL1_18/phase3/includes/resourceloader/ResourceLoader.php |
— | — | @@ -786,4 +786,65 @@ |
787 | 787 | return $retval = $wgRequest->getFuzzyBool( 'debug', |
788 | 788 | $wgRequest->getCookie( 'resourceLoaderDebug', '', $wgResourceLoaderDebug ) ); |
789 | 789 | } |
| 790 | + |
| 791 | + /** |
| 792 | + * Build a load.php URL |
| 793 | + * @param $modules array of module names (strings) |
| 794 | + * @param $lang string Language code |
| 795 | + * @param $skin string Skin name |
| 796 | + * @param $user string|null User name. If null, the &user= parameter is omitted |
| 797 | + * @param $version string|null Versioning timestamp |
| 798 | + * @param $debug bool Whether the request should be in debug mode |
| 799 | + * @param $only string|null &only= parameter |
| 800 | + * @param $printable bool Printable mode |
| 801 | + * @param $handheld bool Handheld mode |
| 802 | + * @param $extraQuery array Extra query parameters to add |
| 803 | + * @return string URL to load.php. May be protocol-relative (if $wgLoadScript is procol-relative) |
| 804 | + */ |
| 805 | + public static function makeLoaderURL( $modules, $lang, $skin, $user = null, $version = null, $debug = false, $only = null, |
| 806 | + $printable = false, $handheld = false, $extraQuery = array() ) { |
| 807 | + global $wgLoadScript; |
| 808 | + $query = self::makeLoaderQuery( $modules, $lang, $skin, $user, $version, $debug, |
| 809 | + $only, $printable, $handheld, $extraQuery |
| 810 | + ); |
| 811 | + |
| 812 | + // Prevent the IE6 extension check from being triggered (bug 28840) |
| 813 | + // by appending a character that's invalid in Windows extensions ('*') |
| 814 | + return wfExpandUrl( wfAppendQuery( $wgLoadScript, $query ) . '&*', PROTO_RELATIVE ); |
| 815 | + } |
| 816 | + |
| 817 | + /** |
| 818 | + * Build a query array (array representation of query string) for load.php. Helper |
| 819 | + * function for makeLoaderURL(). |
| 820 | + * @return array |
| 821 | + */ |
| 822 | + public static function makeLoaderQuery( $modules, $lang, $skin, $user = null, $version = null, $debug = false, $only = null, |
| 823 | + $printable = false, $handheld = false, $extraQuery = array() ) { |
| 824 | + $query = array( |
| 825 | + 'modules' => self::makePackedModulesString( $modules ), |
| 826 | + 'lang' => $lang, |
| 827 | + 'skin' => $skin, |
| 828 | + 'debug' => $debug ? 'true' : 'false', |
| 829 | + ); |
| 830 | + if ( $user !== null ) { |
| 831 | + $query['user'] = $user; |
| 832 | + } |
| 833 | + if ( $version !== null ) { |
| 834 | + $query['version'] = $version; |
| 835 | + } |
| 836 | + if ( $only !== null ) { |
| 837 | + $query['only'] = $only; |
| 838 | + } |
| 839 | + if ( $printable ) { |
| 840 | + $query['printable'] = 1; |
| 841 | + } |
| 842 | + if ( $handheld ) { |
| 843 | + $query['handheld'] = 1; |
| 844 | + } |
| 845 | + $query += $extraQuery; |
| 846 | + |
| 847 | + // Make queries uniform in order |
| 848 | + ksort( $query ); |
| 849 | + return $query; |
| 850 | + } |
790 | 851 | } |
Property changes on: branches/REL1_18/phase3/includes/resourceloader/ResourceLoader.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
791 | 852 | Merged /trunk/phase3/includes/resourceloader/ResourceLoader.php:r97806,97895,98193-98194,98237,98502,98610,98656,98707,98713,98716,98718-98720 |
Index: branches/REL1_18/phase3/includes/parser/Parser.php |
— | — | @@ -2735,10 +2735,8 @@ |
2736 | 2736 | case 'server': |
2737 | 2737 | return $wgServer; |
2738 | 2738 | case 'servername': |
2739 | | - wfSuppressWarnings(); # May give an E_WARNING in PHP < 5.3.3 |
2740 | | - $serverName = parse_url( $wgServer, PHP_URL_HOST ); |
2741 | | - wfRestoreWarnings(); |
2742 | | - return $serverName ? $serverName : $wgServer; |
| 2739 | + $serverParts = wfParseUrl( $wgServer ); |
| 2740 | + return $serverParts && isset( $serverParts['host'] ) ? $serverParts['host'] : $wgServer; |
2743 | 2741 | case 'scriptpath': |
2744 | 2742 | return $wgScriptPath; |
2745 | 2743 | case 'stylepath': |
Index: branches/REL1_18/phase3/includes/templates/Userlogin.php |
— | — | @@ -152,7 +152,7 @@ |
153 | 153 | <?php if( $this->haveData( 'token' ) ) { ?><input type="hidden" name="wpLoginToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?> |
154 | 154 | </form> |
155 | 155 | </div> |
156 | | -<div id="loginend"><?php $this->msgWiki( 'loginend' ); ?></div> |
| 156 | +<div id="loginend"><?php $this->html( 'loginend' ); ?></div> |
157 | 157 | <?php |
158 | 158 | |
159 | 159 | } |
— | — | @@ -377,7 +377,7 @@ |
378 | 378 | <?php if( $this->haveData( 'token' ) ) { ?><input type="hidden" name="wpCreateaccountToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?> |
379 | 379 | </form> |
380 | 380 | </div> |
381 | | -<div id="signupend"><?php $this->msgWiki( 'signupend' ); ?></div> |
| 381 | +<div id="signupend"><?php $this->html( 'signupend' ); ?></div> |
382 | 382 | <?php |
383 | 383 | |
384 | 384 | } |
Index: branches/REL1_18/phase3/includes/specials/SpecialBlock.php |
— | — | @@ -92,7 +92,11 @@ |
93 | 93 | $wgOut->setPageTitle( wfMsg( 'blockip-title' ) ); |
94 | 94 | $wgOut->addModules( 'mediawiki.special', 'mediawiki.special.block' ); |
95 | 95 | |
96 | | - $fields = self::getFormFields(); |
| 96 | + $out = $this->getOutput(); |
| 97 | + $out->setPageTitle( wfMsg( 'blockip-title' ) ); |
| 98 | + $out->addModules( array( 'mediawiki.special', 'mediawiki.special.block' ) ); |
| 99 | + |
| 100 | + $fields = $this->getFormFields(); |
97 | 101 | $this->maybeAlterFormDefaults( $fields ); |
98 | 102 | |
99 | 103 | $form = new HTMLForm( $fields, $this->getContext() ); |
Property changes on: branches/REL1_18/phase3/includes/specials/SpecialBlock.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
100 | 104 | Merged /trunk/phase3/includes/specials/SpecialBlock.php:r97806,97895,98193-98194,98237,98502,98610,98656,98707,98713,98716,98718-98720 |
Index: branches/REL1_18/phase3/includes/specials/SpecialBlockList.php |
— | — | @@ -317,7 +317,7 @@ |
318 | 318 | if ( $row->ipb_create_account ) { |
319 | 319 | $properties[] = $msg['createaccountblock']; |
320 | 320 | } |
321 | | - if ( !$row->ipb_enable_autoblock ) { |
| 321 | + if ( $row->ipb_user && !$row->ipb_enable_autoblock ) { |
322 | 322 | $properties[] = $msg['noautoblockblock']; |
323 | 323 | } |
324 | 324 | |
— | — | @@ -346,6 +346,7 @@ |
347 | 347 | 'fields' => array( |
348 | 348 | 'ipb_id', |
349 | 349 | 'ipb_address', |
| 350 | + 'ipb_user', |
350 | 351 | 'ipb_by', |
351 | 352 | 'ipb_reason', |
352 | 353 | 'ipb_timestamp', |
Index: branches/REL1_18/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -564,6 +564,10 @@ |
565 | 565 | } else { |
566 | 566 | $wgAuth->updateUser( $u ); |
567 | 567 | $wgUser = $u; |
| 568 | + // This should set it for OutputPage and the Skin |
| 569 | + // which is needed or the personal links will be |
| 570 | + // wrong. |
| 571 | + RequestContext::getMain()->setUser( $u ); |
568 | 572 | |
569 | 573 | // Please reset throttle for successful logins, thanks! |
570 | 574 | if ( $throttleCount ) { |
— | — | @@ -1030,6 +1034,22 @@ |
1031 | 1035 | if( $this->mLanguage ) |
1032 | 1036 | $template->set( 'uselang', $this->mLanguage ); |
1033 | 1037 | } |
| 1038 | + |
| 1039 | + // Use loginend-https for HTTPS requests if it's not blank, loginend otherwise |
| 1040 | + // Ditto for signupend |
| 1041 | + $usingHTTPS = WebRequest::detectProtocol(); |
| 1042 | + $loginendHTTPS = wfMessage( 'loginend-https' ); |
| 1043 | + $signupendHTTPS = wfMessage( 'signupend-https' ); |
| 1044 | + if ( $usingHTTPS && !$loginendHTTPS->isBlank() ) { |
| 1045 | + $template->set( 'loginend', $loginendHTTPS->parse() ); |
| 1046 | + } else { |
| 1047 | + $template->set( 'loginend', wfMessage( 'loginend' )->parse() ); |
| 1048 | + } |
| 1049 | + if ( $usingHTTPS && !$signupendHTTPS->isBlank() ) { |
| 1050 | + $template->set( 'signupend', $signupendHTTPS->parse() ); |
| 1051 | + } else { |
| 1052 | + $template->set( 'signupend', wfMessage( 'signupend' )->parse() ); |
| 1053 | + } |
1034 | 1054 | |
1035 | 1055 | // Give authentication and captcha plugins a chance to modify the form |
1036 | 1056 | $wgAuth->modifyUITemplate( $template, $this->mType ); |
Property changes on: branches/REL1_18/phase3/includes/specials |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1037 | 1057 | Merged /trunk/phase3/includes/specials:r97806,97895,98193-98194,98237,98502,98610,98656,98707,98713,98716,98718-98720 |
Index: branches/REL1_18/phase3/includes/api/ApiQuerySiteinfo.php |
— | — | @@ -284,12 +284,12 @@ |
285 | 285 | if ( isset( $langNames[$row->iw_prefix] ) ) { |
286 | 286 | $val['language'] = $langNames[$row->iw_prefix]; |
287 | 287 | } |
288 | | - $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT ); |
289 | | - if( isset( $row['iw_wikiid'] ) ) { |
290 | | - $val['wikiid'] = $row['iw_wikiid']; |
| 288 | + $val['url'] = wfExpandUrl( $row->iw_url, PROTO_CURRENT ); |
| 289 | + if( isset( $row->iw_wikiid ) ) { |
| 290 | + $val['wikiid'] = $row->iw_wikiid; |
291 | 291 | } |
292 | | - if( isset( $row['iw_api'] ) ) { |
293 | | - $val['api'] = $row['iw_api']; |
| 292 | + if( isset( $row->iw_api ) ) { |
| 293 | + $val['api'] = $row->iw_api; |
294 | 294 | } |
295 | 295 | |
296 | 296 | $data[] = $val; |
Property changes on: branches/REL1_18/phase3/includes/api |
___________________________________________________________________ |
Modified: svn:mergeinfo |
297 | 297 | Merged /trunk/phase3/includes/api:r97806,97895,98193-98194,98237,98502,98610,98656,98707,98713,98716,98718-98720 |
298 | 298 | Merged /branches/wmf/1.18wmf1/includes/api:r97789 |
Property changes on: branches/REL1_18/phase3/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
299 | 299 | Merged /trunk/phase3/includes:r97806,97895,98193-98194,98237,98502,98610,98656,98707,98713,98716,98718-98720 |
Index: branches/REL1_18/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1111,8 +1111,10 @@ |
1112 | 1112 | To prevent abuse, only one password reminder will be sent per {{PLURAL:$1|hour|$1 hours}}.', |
1113 | 1113 | 'loginstart' => '', # do not translate or duplicate this message to other languages |
1114 | 1114 | 'loginend' => '', # do not translate or duplicate this message to other languages |
| 1115 | +'loginend-https' => '', # do not translate or duplicate this message to other languages |
1115 | 1116 | 'signupstart' => '{{int:loginstart}}', # do not translate or duplicate this message to other languages |
1116 | 1117 | 'signupend' => '{{int:loginend}}', # do not translate or duplicate this message to other languages |
| 1118 | +'signupend-https' => '', # do not translate or duplicate this message to other languages |
1117 | 1119 | 'mailerror' => 'Error sending mail: $1', |
1118 | 1120 | 'acct_creation_throttle_hit' => 'Visitors to this wiki using your IP address have created {{PLURAL:$1|1 account|$1 accounts}} in the last day, which is the maximum allowed in this time period. |
1119 | 1121 | As a result, visitors using this IP address cannot create any more accounts at the moment.', |
Property changes on: branches/REL1_18/phase3/languages/messages |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1120 | 1122 | Merged /trunk/phase3/languages/messages:r97806,97895,98193-98194,98237,98502,98610,98656,98707,98713,98716,98718-98720 |
Index: branches/REL1_18/phase3/maintenance/language/messages.inc |
— | — | @@ -469,8 +469,10 @@ |
470 | 470 | 'throttled-mailpassword', |
471 | 471 | 'loginstart', |
472 | 472 | 'loginend', |
| 473 | + 'loginend-https', |
473 | 474 | 'signupstart', |
474 | 475 | 'signupend', |
| 476 | + 'signupend-https', |
475 | 477 | 'mailerror', |
476 | 478 | 'acct_creation_throttle_hit', |
477 | 479 | 'emailauthenticated', |
Index: branches/REL1_18/phase3/maintenance/language/messageTypes.inc |
— | — | @@ -105,6 +105,7 @@ |
106 | 106 | 'history_copyright', |
107 | 107 | 'licenses', |
108 | 108 | 'loginstart', |
| 109 | + 'loginend-https', |
109 | 110 | 'loginend', |
110 | 111 | 'loginlanguagelinks', |
111 | 112 | 'pear-mail-error', |
— | — | @@ -128,6 +129,7 @@ |
129 | 130 | 'signature-anon', |
130 | 131 | 'signupstart', |
131 | 132 | 'signupend', |
| 133 | + 'signupend-https', |
132 | 134 | 'sitenotice', |
133 | 135 | 'sitesubtitle', |
134 | 136 | 'sitetitle', |
Index: branches/REL1_18/phase3/maintenance/dumpTextPass.php |
— | — | @@ -422,12 +422,23 @@ |
423 | 423 | function openSpawn() { |
424 | 424 | global $IP; |
425 | 425 | |
426 | | - $cmd = implode( " ", |
427 | | - array_map( 'wfEscapeShellArg', |
428 | | - array( |
429 | | - $this->php, |
430 | | - "$IP/maintenance/fetchText.php", |
431 | | - '--wiki', wfWikiID() ) ) ); |
| 426 | + if ( file_exists( "$IP/../multiversion/MWScript.php" ) ) { |
| 427 | + $cmd = implode( " ", |
| 428 | + array_map( 'wfEscapeShellArg', |
| 429 | + array( |
| 430 | + $this->php, |
| 431 | + "$IP/../multiversion/MWScript.php", |
| 432 | + "fetchText.php", |
| 433 | + '--wiki', wfWikiID() ) ) ); |
| 434 | + } |
| 435 | + else { |
| 436 | + $cmd = implode( " ", |
| 437 | + array_map( 'wfEscapeShellArg', |
| 438 | + array( |
| 439 | + $this->php, |
| 440 | + "$IP/maintenance/fetchText.php", |
| 441 | + '--wiki', wfWikiID() ) ) ); |
| 442 | + } |
432 | 443 | $spec = array( |
433 | 444 | 0 => array( "pipe", "r" ), |
434 | 445 | 1 => array( "pipe", "w" ), |
Property changes on: branches/REL1_18/phase3 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
435 | 446 | Merged /trunk/phase3:r97806,97895,98193-98194,98237,98502,98610,98656,98707,98713,98716,98718-98720 |