From 17475a2094be531cc5dc9cf8759649186256593c Mon Sep 17 00:00:00 2001 From: Ankit Agarwal Date: Wed, 21 Nov 2012 13:22:25 +0800 Subject: [PATCH] MDL-36400 calendar: Allow only ics file type in ical import --- calendar/managesubscriptions_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calendar/managesubscriptions_form.php b/calendar/managesubscriptions_form.php index 63921cf0249..a5ac01f009b 100644 --- a/calendar/managesubscriptions_form.php +++ b/calendar/managesubscriptions_form.php @@ -69,7 +69,7 @@ class calendar_addsubscription_form extends moodleform { $mform->setType('pollinterval', PARAM_INT); // Import file - $mform->addElement('filepicker', 'importfile', get_string('importfromfile', 'calendar')); + $mform->addElement('filepicker', 'importfile', get_string('importfromfile', 'calendar'), null, array('accepted_types' => '.ics')); // Disable appropriate elements depending on import from value. $mform->disabledIf('pollinterval', 'importfrom', 'eq', CALENDAR_IMPORT_FROM_FILE);