From 2e241fea56181b2a33b5de9bb689abd808eeb047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Zi=C3=B3=C5=82ek?= Date: Tue, 16 May 2017 09:25:02 +0200 Subject: [PATCH] MDL-56973 wiki: New page title readonly after changing course language --- mod/wiki/create.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/wiki/create.php b/mod/wiki/create.php index 9f91fe95be1..cdd6489da72 100644 --- a/mod/wiki/create.php +++ b/mod/wiki/create.php @@ -27,8 +27,6 @@ require_once($CFG->dirroot . '/mod/wiki/pagelib.php'); // 'create' action will create a new page in db, and redirect to // page editing page. $action = optional_param('action', 'new', PARAM_TEXT); -// The title of the new page, can be empty -$title = optional_param('title', get_string('newpage', 'wiki'), PARAM_TEXT); $wid = optional_param('wid', 0, PARAM_INT); $swid = optional_param('swid', 0, PARAM_INT); $group = optional_param('group', 0, PARAM_INT); @@ -86,6 +84,8 @@ $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST) require_login($course, true, $cm); +// The title of the new page, cannot be empty. +$title = optional_param('title', get_string('newpage', 'wiki'), PARAM_TEXT); $wikipage = new page_wiki_create($wiki, $subwiki, $cm); if (!empty($swid)) {