Index: trunk/phase3/includes/SpecialNewpages.php |
— | — | @@ -28,6 +28,7 @@ |
29 | 29 | */ |
30 | 30 | public function showList( $par, $including ) { |
31 | 31 | global $wgScript, $wgLang, $wgGroupPermissions, $wgRequest, $wgUser, $wgOut; |
| 32 | + global $wgEnableNewpagesUserFilter; |
32 | 33 | $sk = $wgUser->getSkin(); |
33 | 34 | $self = SpecialPage::getTitleFor( 'NewPages' ); |
34 | 35 | |
— | — | @@ -95,8 +96,10 @@ |
96 | 97 | } |
97 | 98 | } |
98 | 99 | |
99 | | - // hack disable |
100 | | - $options['username'] = ''; |
| 100 | + if( !$wgEnableNewpagesUserFilter ) { |
| 101 | + // hack disable |
| 102 | + $options['username'] = ''; |
| 103 | + } |
101 | 104 | |
102 | 105 | if( !$including ){ |
103 | 106 | $wgOut->setSyndicated( true ); |
— | — | @@ -146,18 +149,17 @@ |
147 | 150 | <td class='mw-input'>" . |
148 | 151 | Xml::namespaceSelector( $options['namespace'], 'all' ) . |
149 | 152 | "</td> |
150 | | - </tr> |
151 | | - <!-- |
152 | | - <tr> |
| 153 | + </tr>" . |
| 154 | + ($wgEnableNewpagesUserFilter ? |
| 155 | + "<tr> |
153 | 156 | <td class='mw-label'>" . |
154 | 157 | Xml::label( wfMsg( 'newpages-username' ), 'mw-np-username' ) . |
155 | 158 | "</td> |
156 | 159 | <td class='mw-input'>" . |
157 | 160 | Xml::input( 'username', 30, $options['username'], array( 'id' => 'mw-np-username' ) ) . |
158 | 161 | "</td> |
159 | | - </tr> |
160 | | - --> |
161 | | - <tr> <td></td> |
| 162 | + </tr>" : "" ) . |
| 163 | + "<tr> <td></td> |
162 | 164 | <td class='mw-submit'>" . |
163 | 165 | Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . |
164 | 166 | "</td> |
— | — | @@ -345,6 +347,7 @@ |
346 | 348 | } |
347 | 349 | |
348 | 350 | function getQueryInfo() { |
| 351 | + global $wgEnableNewpagesUserFilter; |
349 | 352 | $conds = $this->mConds; |
350 | 353 | $conds['rc_new'] = 1; |
351 | 354 | if( $this->namespace !== false ) { |
— | — | @@ -353,6 +356,9 @@ |
354 | 357 | } else { |
355 | 358 | $rcIndexes = array( 'rc_timestamp' ); |
356 | 359 | } |
| 360 | + if( $wgEnableNewpagesUserFilter ) { |
| 361 | + $rcIndex[] = 'rc_user_text'; |
| 362 | + } |
357 | 363 | $conds[] = 'page_id = rc_cur_id'; |
358 | 364 | $conds['page_is_redirect'] = 0; |
359 | 365 | |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1892,6 +1892,11 @@ |
1893 | 1893 | $wgRC2UDPPort = false; |
1894 | 1894 | $wgRC2UDPPrefix = ''; |
1895 | 1895 | |
| 1896 | +# Enable user search in Special:Newpages |
| 1897 | +# This is really a temporary hack around an index install bug on some Wikipedias. |
| 1898 | +# Kill it once fixed. |
| 1899 | +$wgEnableNewpagesUserFilter = true; |
| 1900 | + |
1896 | 1901 | # |
1897 | 1902 | # Copyright and credits settings |
1898 | 1903 | # |