* (bug 12988) $wgMinimalPasswordLength no longer breaks create user by email
* (bug 13022) Fix upload from URL on PHP 5.0.x
* (bug 13132) Unable to unprotect pages protected with earlier versions of MediaWiki
+* (bug 12723) OpenSearch description name now uses more compact language code
+ to avoid passing the length limit as often, is customizable per site via
+ 'opensearch-shortname' message.
+
=== API changes in 1.13 ===
</div>
</form>', # don't translate or duplicate this message to other languages
+# OpenSearch description
+'opensearch-shortname' => '{{SITENAME}} ({{CONTENTLANGUAGE}})',
+
# Preferences page
'preferences' => 'Preferences',
'preferences-summary' => '', # only translate this message to other languages if you have to change it
require_once( dirname(__FILE__) . '/includes/WebStart.php' );
require_once( dirname(__FILE__) . '/languages/Names.php' );
-$fullName = "$wgSitename ({$wgLanguageNames[$wgLanguageCode]})";
+$fullName = "$wgSitename ($wgLanguageCode)";
+$fullName = wfMsg( 'opensearch-shortname' );
$shortName = htmlspecialchars( mb_substr( $fullName, 0, 24 ) );
$siteName = htmlspecialchars( $fullName );
$response = $wgRequest->response();
-$response->header( 'Content-type: application/opensearchdescription+xml' );
+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