Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -81,6 +81,8 @@ |
82 | 82 | * (bug 30062) Add $wgDBprefix option to cli installer |
83 | 83 | * getUserPermissionsErrors and getUserPermissionsErrorsExpensive hooks are now |
84 | 84 | also called when checking for 'read' permission |
| 85 | +* Introduce $wgEnableSearchContributorsByIP which controls whether searching |
| 86 | + for an IP address redirects to the contributions list for that IP |
85 | 87 | |
86 | 88 | === Bug fixes in 1.19 === |
87 | 89 | * $wgUploadNavigationUrl should be used for file redlinks if |
Index: trunk/phase3/CREDITS |
— | — | @@ -145,6 +145,7 @@ |
146 | 146 | * Nx.devnull |
147 | 147 | * Nikolaos S. Karastathis |
148 | 148 | * Olaf Lenz |
| 149 | +* Olivier Finlay Beaton |
149 | 150 | * Paul Copperman |
150 | 151 | * Paul Oranje |
151 | 152 | * PieRRoMaN |
Index: trunk/phase3/includes/search/SearchEngine.php |
— | — | @@ -148,7 +148,7 @@ |
149 | 149 | * Really find the title match. |
150 | 150 | */ |
151 | 151 | private static function getNearMatchInternal( $searchterm ) { |
152 | | - global $wgContLang; |
| 152 | + global $wgContLang, $wgEnableSearchContributorsByIP; |
153 | 153 | |
154 | 154 | $allSearchTerms = array( $searchterm ); |
155 | 155 | |
— | — | @@ -215,10 +215,13 @@ |
216 | 216 | |
217 | 217 | $title = Title::newFromText( $searchterm ); |
218 | 218 | |
| 219 | + |
219 | 220 | # Entering an IP address goes to the contributions page |
220 | | - if ( ( $title->getNamespace() == NS_USER && User::isIP( $title->getText() ) ) |
221 | | - || User::isIP( trim( $searchterm ) ) ) { |
222 | | - return SpecialPage::getTitleFor( 'Contributions', $title->getDBkey() ); |
| 221 | + if ( $wgEnableSearchContributorsByIP ) { |
| 222 | + if ( ( $title->getNamespace() == NS_USER && User::isIP( $title->getText() ) ) |
| 223 | + || User::isIP( trim( $searchterm ) ) ) { |
| 224 | + return SpecialPage::getTitleFor( 'Contributions', $title->getDBkey() ); |
| 225 | + } |
223 | 226 | } |
224 | 227 | |
225 | 228 | |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -4330,6 +4330,13 @@ |
4331 | 4331 | */ |
4332 | 4332 | $wgSitemapNamespacesPriorities = false; |
4333 | 4333 | |
| 4334 | +/** |
| 4335 | + * Search IP |
| 4336 | + * Treat IP searches as a contributor search for those |
| 4337 | + * with permissions to do so. |
| 4338 | + */ |
| 4339 | +$wgEnableSearchContributorsByIP = true; |
| 4340 | + |
4334 | 4341 | /** @} */ # end of search settings |
4335 | 4342 | |
4336 | 4343 | /************************************************************************//** |