Index: trunk/phase3/includes/specials/SpecialPreferences.php |
— | — | @@ -511,13 +511,13 @@ |
512 | 512 | * @access private |
513 | 513 | */ |
514 | 514 | function mainPrefsForm( $status , $message = '' ) { |
515 | | - global $wgUser, $wgOut, $wgLang, $wgContLang; |
| 515 | + global $wgUser, $wgOut, $wgLang, $wgContLang, $wgAuth; |
516 | 516 | global $wgAllowRealName, $wgImageLimits, $wgThumbLimits; |
517 | 517 | global $wgDisableLangConversion, $wgDisableTitleConversion; |
518 | 518 | global $wgEnotifWatchlist, $wgEnotifUserTalk,$wgEnotifMinorEdits; |
519 | 519 | global $wgRCShowWatchingUsers, $wgEnotifRevealEditorAddress; |
520 | 520 | global $wgEnableEmail, $wgEnableUserEmail, $wgEmailAuthentication; |
521 | | - global $wgContLanguageCode, $wgDefaultSkin, $wgAuth; |
| 521 | + global $wgContLanguageCode, $wgDefaultSkin, $wgEnablePersistentCookies; |
522 | 522 | global $wgEmailConfirmToEdit, $wgAjaxSearch, $wgEnableMWSuggest; |
523 | 523 | |
524 | 524 | $wgOut->setPageTitle( wfMsg( 'preferences' ) ); |
— | — | @@ -762,13 +762,19 @@ |
763 | 763 | $this->tableRow( |
764 | 764 | Xml::label( wfMsg( 'retypenew' ), 'wpRetypePass' ), |
765 | 765 | Xml::password( 'wpRetypePass', 25, $this->mRetypePass, array( 'id' => 'wpRetypePass' ) ) |
766 | | - ) . |
767 | | - Xml::tags( 'tr', null, |
768 | | - Xml::tags( 'td', array( 'colspan' => '2' ), |
769 | | - $this->getToggle( "rememberpassword" ) |
770 | | - ) |
771 | 766 | ) |
772 | 767 | ); |
| 768 | + if( $wgEnablePersistentCookies ){ |
| 769 | + $wgOut->addHTML( |
| 770 | + Xml::tags( 'tr', null, |
| 771 | + Xml::tags( 'td', array( 'colspan' => '2' ), |
| 772 | + $this->getToggle( "rememberpassword" ) |
| 773 | + ) |
| 774 | + ) |
| 775 | + ); |
| 776 | + } else { |
| 777 | + $this->mUsedToggles['rememberpassword'] = true; |
| 778 | + } |
773 | 779 | } |
774 | 780 | |
775 | 781 | # <FIXME> |
Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -738,7 +738,7 @@ |
739 | 739 | function mainLoginForm( $msg, $msgtype = 'error' ) { |
740 | 740 | global $wgUser, $wgOut, $wgAllowRealName, $wgEnableEmail; |
741 | 741 | global $wgCookiePrefix, $wgAuth, $wgLoginLanguageSelector; |
742 | | - global $wgAuth, $wgEmailConfirmToEdit; |
| 742 | + global $wgAuth, $wgEmailConfirmToEdit, $wgEnablePersistentCookies; |
743 | 743 | |
744 | 744 | $titleObj = SpecialPage::getTitleFor( 'Userlogin' ); |
745 | 745 | |
— | — | @@ -816,6 +816,7 @@ |
817 | 817 | $template->set( 'useemail', $wgEnableEmail ); |
818 | 818 | $template->set( 'emailrequired', $wgEmailConfirmToEdit ); |
819 | 819 | $template->set( 'canreset', $wgAuth->allowPasswordChange() ); |
| 820 | + $template->set( 'canremember', (bool)$wgEnablePersistentCookies ); |
820 | 821 | $template->set( 'remember', $wgUser->getOption( 'rememberpassword' ) or $this->mRemember ); |
821 | 822 | |
822 | 823 | # Prepare language selection links as needed |
Index: trunk/phase3/includes/templates/Userlogin.php |
— | — | @@ -63,7 +63,8 @@ |
64 | 64 | </select> |
65 | 65 | </td> |
66 | 66 | </tr> |
67 | | - <?php } ?> |
| 67 | + <?php } |
| 68 | + if( $this->data['canremember'] ) { ?> |
68 | 69 | <tr> |
69 | 70 | <td></td> |
70 | 71 | <td class="mw-input"> |
— | — | @@ -74,6 +75,7 @@ |
75 | 76 | /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label> |
76 | 77 | </td> |
77 | 78 | </tr> |
| 79 | + <?php } ?> |
78 | 80 | <tr> |
79 | 81 | <td></td> |
80 | 82 | <td class="mw-submit"> |
— | — | @@ -196,6 +198,7 @@ |
197 | 199 | </td> |
198 | 200 | <?php } ?> |
199 | 201 | </tr> |
| 202 | + <?php if( $this->data['canremember'] ) { ?> |
200 | 203 | <tr> |
201 | 204 | <td></td> |
202 | 205 | <td class="mw-input"> |
— | — | @@ -206,7 +209,8 @@ |
207 | 210 | /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label> |
208 | 211 | </td> |
209 | 212 | </tr> |
210 | | -<?php |
| 213 | +<?php } |
| 214 | + |
211 | 215 | $tabIndex = 8; |
212 | 216 | if ( isset( $this->data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) { |
213 | 217 | foreach ( $this->data['extraInput'] as $inputItem ) { ?> |