* @return String
*/
public static function getOpenSearchTemplate() {
- global $wgOpenSearchTemplate, $wgServer;
+ global $wgOpenSearchTemplate, $wgCanonicalServer;
if ( $wgOpenSearchTemplate ) {
return $wgOpenSearchTemplate;
} else {
if ( !$ns ) {
$ns = "0";
}
- return $wgServer . wfScript( 'api' ) . '?action=opensearch&search={searchTerms}&namespace=' . $ns;
+ return $wgCanonicalServer . wfScript( 'api' ) . '?action=opensearch&search={searchTerms}&namespace=' . $ns;
}
}
'height' => 16,
'width' => 16,
'type' => 'image/x-icon' ),
- wfExpandUrl( $wgFavicon ) );
+ wfExpandUrl( $wgFavicon , PROTO_CURRENT ) );
$urls = array();
$urls[] = array(
'type' => 'text/html',
'method' => 'get',
- 'template' => $searchPage->getFullURL( 'search={searchTerms}' ) );
+ 'template' => $searchPage->getCanonicalURL( 'search={searchTerms}' ) );
if( $wgEnableAPI ) {
// JSON interface for search suggestions.
// sends you to the domain root if you hit "enter" with an empty
// search box.
print Xml::element( 'moz:SearchForm', null,
- $searchPage->getFullUrl() );
+ $searchPage->getCanonicalURL() );
print '</OpenSearchDescription>';