escapeFullURL( 'search={searchTerms}' ); $suggest = htmlspecialchars($wgServer . $wgScriptPath . '/api.php?action=opensearch&search={searchTerms}'); $response = $wgRequest->response(); if( $wgRequest->getVal( 'ctype' ) == 'application/xml' ) { // Makes testing tweaks about a billion times easier $ctype = 'application/xml'; } else { $ctype = 'application/opensearchdescription+xml'; } $response->header( "Content-type: $ctype" ); # Set an Expires header so that squid can cache it for a short time # Short enough so that the sysadmin barely notices when $wgSitename is changed $expiryTime = 600; # 10 minutes $response->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expiryTime ) . ' GMT' ); $response->header( 'Cache-control: max-age=600' ); echo << $shortName $siteName $favicon EOT; ?>