r17040 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17039‎ | r17040 | r17041 >
Date:02:31, 16 October 2006
Author:yurik
Status:old
Tags:
Comment:
* Added search suggestions link.
Modified paths:
  • /trunk/phase3/opensearch_desc.php (modified) (history)

Diff [purge]

Index: trunk/phase3/opensearch_desc.php
@@ -19,6 +19,9 @@
2020 $title = Title::makeTitle( NS_SPECIAL, 'Search' );
2121 $template = $title->escapeFullURL( 'search={searchTerms}' );
2222
 23+$suggest = $wgScriptPath . '/api.php?action=opensearch&search={searchTerms}';
 24+
 25+
2326 $response = $wgRequest->response();
2427 $response->header( 'Content-type: application/opensearchdescription+xml' );
2528
@@ -34,6 +37,7 @@
3538 <Description>$siteName</Description>
3639 <Image height="16" width="16" type="image/x-icon">$favicon</Image>
3740 <Url type="text/html" method="get" template="$template"/>
 41+<Url type="application/x-suggestions+json" method="GET" template="$suggest"/>
3842 </OpenSearchDescription>
3943 EOT;
4044