Index: trunk/phase3/includes/search/SearchEngine.php |
— | — | @@ -472,7 +472,7 @@ |
473 | 473 | * @return String |
474 | 474 | */ |
475 | 475 | public static function getOpenSearchTemplate() { |
476 | | - global $wgOpenSearchTemplate, $wgServer; |
| 476 | + global $wgOpenSearchTemplate, $wgCanonicalServer; |
477 | 477 | if ( $wgOpenSearchTemplate ) { |
478 | 478 | return $wgOpenSearchTemplate; |
479 | 479 | } else { |
— | — | @@ -480,7 +480,7 @@ |
481 | 481 | if ( !$ns ) { |
482 | 482 | $ns = "0"; |
483 | 483 | } |
484 | | - return $wgServer . wfScript( 'api' ) . '?action=opensearch&search={searchTerms}&namespace=' . $ns; |
| 484 | + return $wgCanonicalServer . wfScript( 'api' ) . '?action=opensearch&search={searchTerms}&namespace=' . $ns; |
485 | 485 | } |
486 | 486 | } |
487 | 487 | |
Index: trunk/phase3/opensearch_desc.php |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | 'height' => 16, |
53 | 53 | 'width' => 16, |
54 | 54 | 'type' => 'image/x-icon' ), |
55 | | - wfExpandUrl( $wgFavicon ) ); |
| 55 | + wfExpandUrl( $wgFavicon , PROTO_CURRENT ) ); |
56 | 56 | |
57 | 57 | $urls = array(); |
58 | 58 | |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | $urls[] = array( |
64 | 64 | 'type' => 'text/html', |
65 | 65 | 'method' => 'get', |
66 | | - 'template' => $searchPage->getFullURL( 'search={searchTerms}' ) ); |
| 66 | + 'template' => $searchPage->getCanonicalURL( 'search={searchTerms}' ) ); |
67 | 67 | |
68 | 68 | if( $wgEnableAPI ) { |
69 | 69 | // JSON interface for search suggestions. |
— | — | @@ -86,6 +86,6 @@ |
87 | 87 | // sends you to the domain root if you hit "enter" with an empty |
88 | 88 | // search box. |
89 | 89 | print Xml::element( 'moz:SearchForm', null, |
90 | | - $searchPage->getFullUrl() ); |
| 90 | + $searchPage->getCanonicalURL() ); |
91 | 91 | |
92 | 92 | print '</OpenSearchDescription>'; |
Index: trunk/extensions/OpenSearchXml/OpenSearchXml.php |
— | — | @@ -52,10 +52,10 @@ |
53 | 53 | } |
54 | 54 | |
55 | 55 | function efOpenSearchXmlTemplate() { |
56 | | - global $wgServer, $wgScriptPath; |
| 56 | + global $wgCanonicalServer, $wgScriptPath; |
57 | 57 | $ns = implode( '|', SearchEngine::defaultNamespaces() ); |
58 | 58 | if( !$ns ) { |
59 | 59 | $ns = '0'; |
60 | 60 | } |
61 | | - return $wgServer . $wgScriptPath . '/api.php?action=opensearch&format=xml&search={searchTerms}&namespace=' . $ns; |
| 61 | + return $wgCanonicalServer . $wgScriptPath . '/api.php?action=opensearch&format=xml&search={searchTerms}&namespace=' . $ns; |
62 | 62 | } |