Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParserExtensions.php |
— | — | @@ -189,19 +189,12 @@ |
190 | 190 | |
191 | 191 | /** |
192 | 192 | * The \<ask\> parser hook processing part. This has been replaced by the |
193 | | - * parser function \#ask and should no longer be used. |
| 193 | + * parser function \#ask and is no longer supported. |
| 194 | + * @todo Remove this function entirely, one could have an extension for those who |
| 195 | + * wish to have some intelligent behaviour here. |
194 | 196 | */ |
195 | 197 | static public function doAskHook($querytext, $params, &$parser) { |
196 | | - global $smwgQEnabled, $smwgIQRunningNumber; |
197 | | - if ($smwgQEnabled) { |
198 | | - $smwgIQRunningNumber++; |
199 | | - $result = SMWQueryProcessor::getResultFromHookParams($querytext,$params,SMW_OUTPUT_HTML); |
200 | | - } else { |
201 | | - wfLoadExtensionMessages('SemanticMediaWiki'); |
202 | | - $result = smwfEncodeMessages(array(wfMsgForContent('smw_iq_disabled'))); |
203 | | - } |
204 | | - SMWOutputs::commitToParser($parser); |
205 | | - return $result; |
| 198 | + return '<ask> no longer supported. See SMW documentation on how to do inline queries now.'; |
206 | 199 | } |
207 | 200 | |
208 | 201 | /** |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php |
— | — | @@ -255,27 +255,6 @@ |
256 | 256 | } |
257 | 257 | |
258 | 258 | /** |
259 | | - * Process and answer a query as given by a string and an array of parameters |
260 | | - * as is typically produced by the <ask> parser hook. The result is formatted |
261 | | - * according to the specified $outputformat. The parameter $context defines in |
262 | | - * what context the query is used, which affects certain general settings. |
263 | | - */ |
264 | | - static public function getResultFromHookParams($querystring, $params, $outputmode, $context = SMWQueryProcessor::INLINE_QUERY) { |
265 | | - global $wgParser; |
266 | | - $title = $wgParser->getTitle(); |
267 | | - if ($title === NULL) { // try that in emergency, needed in 1.11 in Special:Ask |
268 | | - global $wgTitle; |
269 | | - $title = $wgTitle; |
270 | | - } |
271 | | - // Take care at least of some templates -- for better template support use #ask |
272 | | - $parser = new Parser(); |
273 | | - $parserOptions = new ParserOptions(); |
274 | | - $parser->startExternalParse( $title, $parserOptions, OT_HTML ); |
275 | | - $querystring = $parser->transformMsg( $querystring, $parserOptions ); |
276 | | - return SMWQueryProcessor::getResultFromQueryString($querystring, $params, array(), $outputmode, $context); |
277 | | - } |
278 | | - |
279 | | - /** |
280 | 259 | * Process a query string in SMW's query language and return a formatted |
281 | 260 | * result set as HTML text. A parameter array of key-value-pairs constrains |
282 | 261 | * the query and determines the serialisation mode for results. The parameter |