From 9ea05545197378466dc3ceee0f55bcd5819264cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 21 Feb 2007 07:27:15 +0000 Subject: Aktualisierung auf MediaWiki 1.9.3 --- includes/AjaxDispatcher.php | 12 ++++++------ includes/DefaultSettings.php | 2 +- includes/EditPage.php | 2 +- includes/GlobalFunctions.php | 2 +- includes/Metadata.php | 2 +- includes/OutputPage.php | 1 + includes/SpecialRecentchangeslinked.php | 2 +- includes/StreamFile.php | 2 +- includes/Wiki.php | 3 ++- 9 files changed, 15 insertions(+), 13 deletions(-) (limited to 'includes') diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index 89062f87..39ec19f8 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -54,15 +54,15 @@ class AjaxDispatcher { wfProfileIn( __METHOD__ ); if (! in_array( $this->func_name, $wgAjaxExportList ) ) { - header( 'Status: 400 Bad Request', true, 400 ); - print "unknown function " . htmlspecialchars( (string) $this->func_name ); + wfHttpError( 400, 'Bad Request', + "unknown function " . (string) $this->func_name ); } else { try { $result = call_user_func_array($this->func_name, $this->args); if ( $result === false || $result === NULL ) { - header( 'Status: 500 Internal Error', true, 500 ); - echo "{$this->func_name} returned no data"; + wfHttpError( 500, 'Internal Error', + "{$this->func_name} returned no data" ); } else { if ( is_string( $result ) ) { @@ -75,8 +75,8 @@ class AjaxDispatcher { } catch (Exception $e) { if (!headers_sent()) { - header( 'Status: 500 Internal Error', true, 500 ); - print $e->getMessage(); + wfHttpError( 500, 'Internal Error', + $e->getMessage() ); } else { print $e->getMessage(); } diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index df1b9d55..0692401d 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -32,7 +32,7 @@ require_once( 'includes/SiteConfiguration.php' ); $wgConf = new SiteConfiguration; /** MediaWiki version number */ -$wgVersion = '1.9.2'; +$wgVersion = '1.9.3'; /** Name of the site. It must be changed in LocalSettings.php */ $wgSitename = 'MediaWiki'; diff --git a/includes/EditPage.php b/includes/EditPage.php index c53389cc..7688a64a 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1765,7 +1765,7 @@ END function livePreview() { global $wgOut; $wgOut->disable(); - header( 'Content-type: text/xml' ); + header( 'Content-type: text/xml; charset=utf-8' ); header( 'Cache-control: no-cache' ); # FIXME echo $this->getPreviewText( ); diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index da24e4a7..de07b321 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1078,7 +1078,7 @@ function wfHttpError( $code, $label, $desc ) { header( "Status: $code $label" ); $wgOut->sendCacheControl(); - header( 'Content-type: text/html' ); + header( 'Content-type: text/html; charset=utf-8' ); print "". "" . htmlspecialchars( $label ) . diff --git a/includes/Metadata.php b/includes/Metadata.php index b48ced0d..4e0d91b7 100644 --- a/includes/Metadata.php +++ b/includes/Metadata.php @@ -81,7 +81,7 @@ function rdfSetup() { return false; } else { $wgOut->disable(); - header( "Content-type: {$rdftype}" ); + header( "Content-type: {$rdftype}; charset=utf-8" ); $wgOut->sendCacheControl(); return true; } diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 4ca9e88a..6d3cc0ac 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -561,6 +561,7 @@ class OutputPage { $this->sendCacheControl(); + $wgRequest->response()->header("Content-Type: text/html; charset=utf-8"); if( $wgDebugRedirects ) { $url = htmlspecialchars( $this->mRedirect ); print "<html>\n<head>\n<title>Redirect\n\n\n"; diff --git a/includes/SpecialRecentchangeslinked.php b/includes/SpecialRecentchangeslinked.php index 2214576c..15292898 100644 --- a/includes/SpecialRecentchangeslinked.php +++ b/includes/SpecialRecentchangeslinked.php @@ -73,7 +73,7 @@ function wfSpecialRecentchangeslinked( $par = NULL ) { $GROUPBY = " GROUP BY rc_cur_id,rc_namespace,rc_title, rc_user,rc_comment,rc_user_text,rc_timestamp,rc_minor, - rc_new, rc_id, rc_this_oldid, rc_last_oldid, rc_bot, rc_patrolled, rc_type + rc_new, rc_id, rc_this_oldid, rc_last_oldid, rc_bot, rc_patrolled, rc_type, rc_old_len, rc_new_len " . ($uid ? ",wl_user" : "") . " ORDER BY rc_timestamp DESC LIMIT {$limit}"; diff --git a/includes/StreamFile.php b/includes/StreamFile.php index 949422d6..dc653e57 100644 --- a/includes/StreamFile.php +++ b/includes/StreamFile.php @@ -7,7 +7,7 @@ function wfStreamFile( $fname ) { if ( !$stat ) { header( 'HTTP/1.0 404 Not Found' ); header( 'Cache-Control: no-cache' ); - header( 'Content-Type: text/html' ); + header( 'Content-Type: text/html; charset=utf-8' ); $encFile = htmlspecialchars( $fname ); $encScript = htmlspecialchars( $_SERVER['SCRIPT_NAME'] ); echo " diff --git a/includes/Wiki.php b/includes/Wiki.php index 06ae8cfe..06248b35 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -422,7 +422,8 @@ class MediaWiki { } break; case 'history': - if( $_SERVER['REQUEST_URI'] == $title->getInternalURL( 'action=history' ) ) { + global $wgRequest; + if( $wgRequest->getFullRequestURL() == $title->getInternalURL( 'action=history' ) ) { $output->setSquidMaxage( $this->getVal( 'SquidMaxage' ) ); } $history = new PageHistory( $article ); -- cgit v1.2.3-54-g00ecf