Using WikiError seems to be useless here
[lhc/web/wiklou.git] / opensearch_desc.php
index 187a74b..82e74b2 100644 (file)
@@ -6,8 +6,7 @@
 
 require_once( dirname(__FILE__) . '/includes/WebStart.php' );
 require_once( dirname(__FILE__) . '/languages/Names.php' );
-$fullName = "$wgSitename ($wgLanguageCode)";
-$fullName = wfMsg( 'opensearch-shortname' );
+$fullName = wfMsgForContent( 'opensearch-desc' );
 $shortName = htmlspecialchars( mb_substr( $fullName, 0, 24 ) );
 $siteName = htmlspecialchars( $fullName );
 
@@ -17,7 +16,7 @@ $favicon = htmlspecialchars( wfExpandUrl( $wgFavicon ) );
 $title = SpecialPage::getTitleFor( 'Search' );
 $template = $title->escapeFullURL( 'search={searchTerms}' );
 
-$suggest = htmlspecialchars($wgServer . $wgScriptPath . '/api.php?action=opensearch&search={searchTerms}');
+$suggest = htmlspecialchars(SearchEngine::getOpenSearchTemplate() );
 
 
 $response = $wgRequest->response();