From cecb985bee3bdd252e1b8dc0bd500b37cd52be01 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 16 May 2007 20:58:53 +0000 Subject: Aktualisierung auf MediaWiki 1.10.0 Plugins angepasst und verbessert kleine Korrekturen am Design --- includes/AjaxDispatcher.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'includes/AjaxDispatcher.php') diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index 39ec19f8..ca129029 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -1,7 +1,8 @@ mode = ""; @@ -28,14 +33,14 @@ class AjaxDispatcher { } if ($this->mode == "get") { - $this->func_name = $_GET["rs"]; + $this->func_name = isset( $_GET["rs"] ) ? $_GET["rs"] : ''; if (! empty($_GET["rsargs"])) { $this->args = $_GET["rsargs"]; } else { $this->args = array(); } } else { - $this->func_name = $_POST["rs"]; + $this->func_name = isset( $_POST["rs"] ) ? $_POST["rs"] : ''; if (! empty($_POST["rsargs"])) { $this->args = $_POST["rsargs"]; } else { @@ -47,7 +52,7 @@ class AjaxDispatcher { function performAction() { global $wgAjaxExportList, $wgOut; - + if ( empty( $this->mode ) ) { return; } @@ -59,7 +64,7 @@ class AjaxDispatcher { } else { try { $result = call_user_func_array($this->func_name, $this->args); - + if ( $result === false || $result === NULL ) { wfHttpError( 500, 'Internal Error', "{$this->func_name} returned no data" ); @@ -68,7 +73,7 @@ class AjaxDispatcher { if ( is_string( $result ) ) { $result= new AjaxResponse( $result ); } - + $result->sendHeaders(); $result->printText(); } @@ -82,7 +87,7 @@ class AjaxDispatcher { } } } - + wfProfileOut( __METHOD__ ); $wgOut = null; } -- cgit v1.2.2