Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -131,7 +131,7 @@ |
132 | 132 | correctly. |
133 | 133 | * (bug 29567) mw.util.addPortletLink should only wrap link in <span> for |
134 | 134 | "vectorTabs" portlets. |
135 | | -* (bug 8556) Incorrect session failure warning on preview-on-open |
| 135 | +* (bug 8556) Incorrect session failure warning on preview-on-open |
136 | 136 | namespaces (categories) when combined with $wgRawHtml. |
137 | 137 | * Use content language in formatting of dates in revertpage message |
138 | 138 | (rollback revert edit summary) and do not adjust for user timezone. |
— | — | @@ -165,6 +165,7 @@ |
166 | 166 | * (bug 27595) sha1 search of list=filearchive does not work |
167 | 167 | * (bug 26763) Make RSS/Atom of user contributions more visible |
168 | 168 | * (bug 25133) Allow redirects also for action=parse&pageid |
| 169 | +* (bug 29745) Fatal error in API search |
169 | 170 | |
170 | 171 | === Languages updated in 1.19 === |
171 | 172 | |
Index: trunk/phase3/includes/api/ApiQuerySearch.php |
— | — | @@ -97,17 +97,17 @@ |
98 | 98 | $this->dieUsage( "{$what} search is disabled", "search-{$what}-disabled" ); |
99 | 99 | } |
100 | 100 | |
101 | | - $result = $this->getResult(); |
| 101 | + $apiResult = $this->getResult(); |
102 | 102 | // Add search meta data to result |
103 | 103 | if ( isset( $searchInfo['totalhits'] ) ) { |
104 | 104 | $totalhits = $matches->getTotalHits(); |
105 | 105 | if ( $totalhits !== null ) { |
106 | | - $result->addValue( array( 'query', 'searchinfo' ), |
| 106 | + $apiResult->addValue( array( 'query', 'searchinfo' ), |
107 | 107 | 'totalhits', $totalhits ); |
108 | 108 | } |
109 | 109 | } |
110 | 110 | if ( isset( $searchInfo['suggestion'] ) && $matches->hasSuggestion() ) { |
111 | | - $result->addValue( array( 'query', 'searchinfo' ), |
| 111 | + $apiResult->addValue( array( 'query', 'searchinfo' ), |
112 | 112 | 'suggestion', $matches->getSuggestionQuery() ); |
113 | 113 | } |
114 | 114 | |
— | — | @@ -116,6 +116,7 @@ |
117 | 117 | $titles = array(); |
118 | 118 | $count = 0; |
119 | 119 | $result = $matches->next(); |
| 120 | + |
120 | 121 | while ( $result ) { |
121 | 122 | if ( ++ $count > $limit ) { |
122 | 123 | // We've reached the one extra which shows that there are additional items to be had. Stop here... |
— | — | @@ -172,7 +173,7 @@ |
173 | 174 | } |
174 | 175 | |
175 | 176 | // Add item to results and see whether it fits |
176 | | - $fit = $result->addValue( array( 'query', $this->getModuleName() ), |
| 177 | + $fit = $apiResult->addValue( array( 'query', $this->getModuleName() ), |
177 | 178 | null, $vals ); |
178 | 179 | if ( !$fit ) { |
179 | 180 | $this->setContinueEnumParameter( 'offset', $params['offset'] + $count - 1 ); |
— | — | @@ -186,7 +187,7 @@ |
187 | 188 | } |
188 | 189 | |
189 | 190 | if ( is_null( $resultPageSet ) ) { |
190 | | - $result->setIndexedTagName_internal( array( |
| 191 | + $apiResult->setIndexedTagName_internal( array( |
191 | 192 | 'query', $this->getModuleName() |
192 | 193 | ), 'p' ); |
193 | 194 | } else { |