X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=opensearch_desc.php;h=ecd5051cd991b9c5a198db0533920db5df80b5bf;hb=45a985652080214aadd4ee0fcfdee5af64c148f1;hp=a5e48fa77c0ae51fc0a31cab06b57f0d1743a451;hpb=4acf38255f60c7f91a30e9f2aefabfcbbe41a6ce;p=lhc%2Fweb%2Fwiklou.git diff --git a/opensearch_desc.php b/opensearch_desc.php index a5e48fa77c..ecd5051cd9 100644 --- a/opensearch_desc.php +++ b/opensearch_desc.php @@ -20,9 +20,9 @@ * @file */ -require_once( dirname(__FILE__) . '/includes/WebStart.php' ); +require_once __DIR__ . '/includes/WebStart.php'; -if( $wgRequest->getVal( 'ctype' ) == 'application/xml' ) { +if ( $wgRequest->getVal( 'ctype' ) == 'application/xml' ) { // Makes testing tweaks about a billion times easier $ctype = 'application/xml'; } else { @@ -54,7 +54,7 @@ print Xml::openElement( 'OpenSearchDescription', // // Behavior seems about the same between Firefox and IE 7/8 here. // 'Description' doesn't appear to be used by either. -$fullName = wfMsgForContent( 'opensearch-desc' ); +$fullName = wfMessage( 'opensearch-desc' )->inContentLanguage()->text(); print Xml::element( 'ShortName', null, $fullName ); print Xml::element( 'Description', null, $fullName ); @@ -65,7 +65,7 @@ print Xml::element( 'Image', 'height' => 16, 'width' => 16, 'type' => 'image/x-icon' ), - wfExpandUrl( $wgFavicon , PROTO_CURRENT ) ); + wfExpandUrl( $wgFavicon, PROTO_CURRENT ) ); $urls = array(); @@ -78,7 +78,7 @@ $urls[] = array( 'method' => 'get', 'template' => $searchPage->getCanonicalURL( 'search={searchTerms}' ) ); -if( $wgEnableAPI ) { +if ( $wgEnableAPI ) { // JSON interface for search suggestions. // Supported in Firefox 2 and later. $urls[] = array( @@ -91,7 +91,7 @@ if( $wgEnableAPI ) { // general way than overriding the whole search engine... wfRunHooks( 'OpenSearchUrls', array( &$urls ) ); -foreach( $urls as $attribs ) { +foreach ( $urls as $attribs ) { print Xml::element( 'Url', $attribs ); }