From 086ae52d12011746a75f5588e877347bc0457352 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 21 Mar 2008 11:49:34 +0100 Subject: Update auf MediaWiki 1.12.0 --- opensearch_desc.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'opensearch_desc.php') diff --git a/opensearch_desc.php b/opensearch_desc.php index b06b7fee..d766f197 100644 --- a/opensearch_desc.php +++ b/opensearch_desc.php @@ -10,11 +10,8 @@ $fullName = "$wgSitename ({$wgLanguageNames[$wgLanguageCode]})"; $shortName = htmlspecialchars( mb_substr( $fullName, 0, 24 ) ); $siteName = htmlspecialchars( $fullName ); -if ( !preg_match( '/^https?:/', $wgFavicon ) ) { - $favicon = htmlspecialchars( $wgServer . $wgFavicon ); -} else { - $favicon = htmlspecialchars( $wgFavicon ); -} + +$favicon = htmlspecialchars( wfExpandUrl( $wgFavicon ) ); $title = SpecialPage::getTitleFor( 'Search' ); $template = $title->escapeFullURL( 'search={searchTerms}' ); @@ -27,8 +24,9 @@ $response->header( 'Content-type: application/opensearchdescription+xml' ); # 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 = 300; # 5 minutes +$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 << -- cgit v1.2.2