From 18fb4d75f58378e567a4c93965c5b30c86cc04bc Mon Sep 17 00:00:00 2001 From: Dongsheng Cai Date: Wed, 25 Aug 2010 05:56:48 +0000 Subject: [PATCH] "MDL-23917, move action parameter above" --- comment/comment_ajax.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/comment/comment_ajax.php b/comment/comment_ajax.php index 8aeb4bc122..022676f0cd 100644 --- a/comment/comment_ajax.php +++ b/comment/comment_ajax.php @@ -29,6 +29,8 @@ $PAGE->set_context($context); $PAGE->set_url('/comment/comment_ajax.php'); +$action = optional_param('action', '', PARAM_ALPHA); + // XXX: display comments in frontpage without login if ($context->id != get_context_instance(CONTEXT_COURSE, SITEID)->id or $action == 'add' @@ -37,7 +39,6 @@ } require_sesskey(); -$action = optional_param('action', '', PARAM_ALPHA); $area = optional_param('area', '', PARAM_ALPHAEXT); $client_id = optional_param('client_id', '', PARAM_RAW); $commentid = optional_param('commentid', -1, PARAM_INT);