From f6cdef58cb8f196142d0b9fdb8a0e31b508f9a85 Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Thu, 8 Nov 2012 17:38:57 +0800 Subject: [PATCH] MDL-36453 - mod_data: Presets now load in a Windows environment. Thanks to Michael de Raadt for this patch. --- mod/data/preset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/data/preset.php b/mod/data/preset.php index bd3142839fc..e36af7bdf57 100644 --- a/mod/data/preset.php +++ b/mod/data/preset.php @@ -216,7 +216,7 @@ if (optional_param('sesskey', false, PARAM_BOOL) && confirm_sesskey()) { } else if ($action == 'finishimport') { $overwritesettings = optional_param('overwritesettings', false, PARAM_BOOL); if (!$fullname) { - $presetdir = $CFG->tempdir.'/forms/'.required_param('directory', PARAM_ALPHANUMEXT); + $presetdir = $CFG->tempdir.'/forms/'.required_param('directory', PARAM_FILE); if (!file_exists($presetdir) || !is_dir($presetdir)) { print_error('cannotimport'); }