diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2007-01-11 19:06:07 +0000 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2007-01-11 19:06:07 +0000 |
commit | a58285fd06c8113c45377c655dd43cef6337e815 (patch) | |
tree | dfe31d3d12652352fe44890b4811eda0728faefb /opensearch_desc.php | |
parent | 20194986f6638233732ba1fc3e838f117d3cc9ea (diff) |
Aktualisierung auf MediaWiki 1.9.0
Diffstat (limited to 'opensearch_desc.php')
-rw-r--r-- | opensearch_desc.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/opensearch_desc.php b/opensearch_desc.php index 59d61eee..b06b7fee 100644 --- a/opensearch_desc.php +++ b/opensearch_desc.php @@ -16,9 +16,12 @@ if ( !preg_match( '/^https?:/', $wgFavicon ) ) { $favicon = htmlspecialchars( $wgFavicon ); } -$title = Title::makeTitle( NS_SPECIAL, 'Search' ); +$title = SpecialPage::getTitleFor( 'Search' ); $template = $title->escapeFullURL( 'search={searchTerms}' ); +$suggest = htmlspecialchars($wgServer . $wgScriptPath . '/api.php?action=opensearch&search={searchTerms}'); + + $response = $wgRequest->response(); $response->header( 'Content-type: application/opensearchdescription+xml' ); @@ -34,6 +37,7 @@ echo <<<EOT <Description>$siteName</Description> <Image height="16" width="16" type="image/x-icon">$favicon</Image> <Url type="text/html" method="get" template="$template"/> +<Url type="application/x-suggestions+json" method="GET" template="$suggest"/> </OpenSearchDescription> EOT; |