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 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'includes/AjaxDispatcher.php') 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(); } -- cgit v1.2.2