Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -858,7 +858,9 @@ |
859 | 859 | 'prefs-rc', |
860 | 860 | 'prefs-watchlist', |
861 | 861 | 'prefs-watchlist-days', |
| 862 | + 'prefs-watchlist-days-max', |
862 | 863 | 'prefs-watchlist-edits', |
| 864 | + 'prefs-watchlist-edits-max', |
863 | 865 | 'prefs-misc', |
864 | 866 | 'saveprefs', |
865 | 867 | 'resetprefs', |
— | — | @@ -874,6 +876,7 @@ |
875 | 877 | 'contextchars', |
876 | 878 | 'stub-threshold', |
877 | 879 | 'recentchangesdays', |
| 880 | + 'recentchangesdays-max', |
878 | 881 | 'recentchangescount', |
879 | 882 | 'savedprefs', |
880 | 883 | 'timezonelegend', |
Index: trunk/phase3/includes/specials/SpecialPreferences.php |
— | — | @@ -1003,41 +1003,58 @@ |
1004 | 1004 | $wgOut->addHTML( '</fieldset>' ); |
1005 | 1005 | |
1006 | 1006 | # Recent changes |
1007 | | - $wgOut->addHTML( '<fieldset><legend>' . wfMsgHtml( 'prefs-rc' ) . '</legend>' ); |
| 1007 | + global $wgRCMaxAge; |
| 1008 | + $wgOut->addHTML( |
| 1009 | + Xml::fieldset( wfMsg( 'prefs-rc' ) ) . |
| 1010 | + Xml::openElement( 'table' ) . |
| 1011 | + '<tr> |
| 1012 | + <td class="mw-label">' . |
| 1013 | + Xml::label( wfMsg( 'recentchangesdays' ), 'wpRecentDays' ) . |
| 1014 | + '</td> |
| 1015 | + <td class="mw-input">' . |
| 1016 | + Xml::input( 'wpRecentDays', 3, $this->mRecentDays, array( 'id' => 'wpRecentDays' ) ) . ' ' . |
| 1017 | + wfMsgExt( 'recentchangesdays-max', 'parsemag', |
| 1018 | + $wgLang->formatNum( ceil( $wgRCMaxAge / ( 3600 * 24 ) ) ) ) . |
| 1019 | + '</td> |
| 1020 | + </tr><tr> |
| 1021 | + <td class="mw-label">' . |
| 1022 | + Xml::label( wfMsg( 'recentchangescount' ), 'wpRecent' ) . |
| 1023 | + '</td> |
| 1024 | + <td class="mw-input">' . |
| 1025 | + Xml::input( 'wpRecent', 3, $this->mRecent, array( 'id' => 'wpRecent' ) ) . |
| 1026 | + '</td> |
| 1027 | + </tr>' . |
| 1028 | + Xml::closeElement( 'table' ) . |
| 1029 | + '<br />' |
| 1030 | + ); |
1008 | 1031 | |
1009 | | - $rc = '<table><tr>'; |
1010 | | - $rc .= '<td>' . Xml::label( wfMsg( 'recentchangesdays' ), 'wpRecentDays' ) . '</td>'; |
1011 | | - $rc .= '<td>' . Xml::input( 'wpRecentDays', 3, $this->mRecentDays, array( 'id' => 'wpRecentDays' ) ) . '</td>'; |
1012 | | - $rc .= '</tr><tr>'; |
1013 | | - $rc .= '<td>' . Xml::label( wfMsg( 'recentchangescount' ), 'wpRecent' ) . '</td>'; |
1014 | | - $rc .= '<td>' . Xml::input( 'wpRecent', 3, $this->mRecent, array( 'id' => 'wpRecent' ) ) . '</td>'; |
1015 | | - $rc .= '</tr></table>'; |
1016 | | - $wgOut->addHTML( $rc ); |
1017 | | - |
1018 | | - $wgOut->addHTML( '<br />' ); |
1019 | | - |
1020 | 1032 | $toggles[] = 'hideminor'; |
1021 | 1033 | if( $wgRCShowWatchingUsers ) |
1022 | 1034 | $toggles[] = 'shownumberswatching'; |
1023 | 1035 | $toggles[] = 'usenewrc'; |
1024 | | - $wgOut->addHTML( $this->getToggles( $toggles ) ); |
1025 | 1036 | |
1026 | | - $wgOut->addHTML( '</fieldset>' ); |
| 1037 | + $wgOut->addHTML( |
| 1038 | + $this->getToggles( $toggles ) . |
| 1039 | + Xml::closeElement( 'fieldset' ) |
| 1040 | + ); |
1027 | 1041 | |
1028 | 1042 | # Watchlist |
1029 | | - $wgOut->addHTML( '<fieldset><legend>' . wfMsgHtml( 'prefs-watchlist' ) . '</legend>' ); |
| 1043 | + $wgOut->addHTML( |
| 1044 | + Xml::fieldset( wfMsg( 'prefs-watchlist' ) ) . |
| 1045 | + Xml::inputLabel( wfMsg( 'prefs-watchlist-days' ), 'wpWatchlistDays', 'wpWatchlistDays', 3, $this->mWatchlistDays ) . ' ' . |
| 1046 | + wfMsgHTML( 'prefs-watchlist-days-max' ) . |
| 1047 | + '<br /><br />' . |
| 1048 | + $this->getToggle( 'extendwatchlist' ) . |
| 1049 | + Xml::inputLabel( wfMsg( 'prefs-watchlist-edits' ), 'wpWatchlistEdits', 'wpWatchlistEdits', 3, $this->mWatchlistEdits ) . ' ' . |
| 1050 | + wfMsgHTML( 'prefs-watchlist-edits-max' ) . |
| 1051 | + '<br /><br />' . |
| 1052 | + $this->getToggles( array( 'watchlisthideminor', 'watchlisthidebots', 'watchlisthideown', 'watchlisthideanons', 'watchlisthideliu' ) ) |
| 1053 | + ); |
1030 | 1054 | |
1031 | | - $wgOut->addHTML( wfInputLabel( wfMsg( 'prefs-watchlist-days' ), 'wpWatchlistDays', 'wpWatchlistDays', 3, $this->mWatchlistDays ) ); |
1032 | | - $wgOut->addHTML( '<br /><br />' ); |
| 1055 | + if( $wgUser->isAllowed( 'createpage' ) || $wgUser->isAllowed( 'createtalk' ) ) { |
| 1056 | + $wgOut->addHTML( $this->getToggle( 'watchcreations' ) ); |
| 1057 | + } |
1033 | 1058 | |
1034 | | - $wgOut->addHTML( $this->getToggle( 'extendwatchlist' ) ); |
1035 | | - $wgOut->addHTML( wfInputLabel( wfMsg( 'prefs-watchlist-edits' ), 'wpWatchlistEdits', 'wpWatchlistEdits', 3, $this->mWatchlistEdits ) ); |
1036 | | - $wgOut->addHTML( '<br /><br />' ); |
1037 | | - |
1038 | | - $wgOut->addHTML( $this->getToggles( array( 'watchlisthideminor', 'watchlisthidebots', 'watchlisthideown', 'watchlisthideanons', 'watchlisthideliu' ) ) ); |
1039 | | - |
1040 | | - if( $wgUser->isAllowed( 'createpage' ) || $wgUser->isAllowed( 'createtalk' ) ) |
1041 | | - $wgOut->addHTML( $this->getToggle( 'watchcreations' ) ); |
1042 | 1059 | foreach( array( 'edit' => 'watchdefault', 'move' => 'watchmoves', 'delete' => 'watchdeletion' ) as $action => $toggle ) { |
1043 | 1060 | if( $wgUser->isAllowed( $action ) ) |
1044 | 1061 | $wgOut->addHTML( $this->getToggle( $toggle ) ); |
— | — | @@ -1047,7 +1064,7 @@ |
1048 | 1065 | $this->mUsedToggles['watchmoves'] = true; |
1049 | 1066 | $this->mUsedToggles['watchdeletion'] = true; |
1050 | 1067 | |
1051 | | - $wgOut->addHTML( '</fieldset>' ); |
| 1068 | + $wgOut->addHTML( Xml::closeElement( 'fieldset' ) ); |
1052 | 1069 | |
1053 | 1070 | # Search |
1054 | 1071 | $mwsuggest = $wgEnableMWSuggest ? |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1539,7 +1539,9 @@ |
1540 | 1540 | 'prefs-rc' => 'Recent changes', |
1541 | 1541 | 'prefs-watchlist' => 'Watchlist', |
1542 | 1542 | 'prefs-watchlist-days' => 'Days to show in watchlist:', |
| 1543 | +'prefs-watchlist-days-max' => '(maximum 7 days)', |
1543 | 1544 | 'prefs-watchlist-edits' => 'Maximum number of changes to show in expanded watchlist:', |
| 1545 | +'prefs-watchlist-edits-max'=> '(maximum number: 1000)', |
1544 | 1546 | 'prefs-misc' => 'Misc', |
1545 | 1547 | 'saveprefs' => 'Save', |
1546 | 1548 | 'resetprefs' => 'Clear unsaved changes', |
— | — | @@ -1555,6 +1557,7 @@ |
1556 | 1558 | 'contextchars' => 'Context per line:', |
1557 | 1559 | 'stub-threshold' => 'Threshold for <a href="#" class="stub">stub link</a> formatting (bytes):', |
1558 | 1560 | 'recentchangesdays' => 'Days to show in recent changes:', |
| 1561 | +'recentchangesdays-max' => '(maximum $1 {{PLURAL:$1|day|days}})', |
1559 | 1562 | 'recentchangescount' => 'Number of edits to show in recent changes, history and log pages:', |
1560 | 1563 | 'savedprefs' => 'Your preferences have been saved.', |
1561 | 1564 | 'timezonelegend' => 'Time zone', |