Index: branches/wmf-deployment/includes/api/ApiOpenSearch.php |
— | — | @@ -42,16 +42,15 @@ |
43 | 43 | } |
44 | 44 | |
45 | 45 | public function execute() { |
46 | | - global $wgEnableMWSuggest; |
| 46 | + global $wgEnableMWSuggest, $wgSearchSuggestCacheExpiry, $wgGroupPermissions, $wgUser; |
47 | 47 | $params = $this->extractRequestParams(); |
48 | 48 | $search = $params['search']; |
49 | 49 | $limit = $params['limit']; |
50 | 50 | $namespaces = $params['namespace']; |
51 | 51 | $suggest = $params['suggest']; |
52 | 52 | |
53 | | - // $wgEnableMWSuggest hit incoming when $wgEnableMWSuggest is |
54 | | - // disabled |
55 | | - if( $suggest && !$wgEnableMWSuggest ) |
| 53 | + // MWSuggest or similar hit, or hit without read rights |
| 54 | + if ( ( $suggest && !$wgEnableMWSuggest ) || ( !$wgGroupPermissions['*']['read'] && !$wgUser->isAllowed( 'read' ) ) ) |
56 | 55 | $srchres = array(); |
57 | 56 | else { |
58 | 57 | // Open search results may be stored for a very long |
— | — | @@ -108,4 +107,8 @@ |
109 | 108 | public function getVersion() { |
110 | 109 | return __CLASS__ . ': $Id$'; |
111 | 110 | } |
| 111 | + |
| 112 | + public function isReadMode() { |
| 113 | + return false; |
| 114 | + } |
112 | 115 | } |
Property changes on: branches/wmf-deployment/includes/api/ApiMain.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
113 | 116 | Merged /trunk/phase3/includes/api/ApiMain.php:r62540 |
Property changes on: branches/wmf-deployment/includes/api/ApiQueryBacklinks.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
114 | 117 | Merged /trunk/phase3/includes/api/ApiQueryBacklinks.php:r62540 |
Property changes on: branches/wmf-deployment/includes/api |
___________________________________________________________________ |
Modified: svn:mergeinfo |
115 | 118 | Merged /trunk/phase3/includes/api:r62540 |