From 0b956a64d85a0f9e7c43efa4cd7e51f28216ebf0 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Tue, 9 Dec 2014 13:36:25 +0100 Subject: [PATCH] MDL-46814 calendar export: Minor coding tweaks --- calendar/classes/export_form.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/calendar/classes/export_form.php b/calendar/classes/export_form.php index e5d2e161c6a..487c59567cb 100644 --- a/calendar/classes/export_form.php +++ b/calendar/classes/export_form.php @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -/* +/** * The mform for exporting calendar events * * @package core_calendar @@ -22,16 +22,13 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die(); // Always include formslib. -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); // It must be included from a Moodle page. -} - require_once($CFG->dirroot.'/lib/formslib.php'); /** - * The mform class for creating and editing a calendar + * The mform class for exporting a calendar * * @copyright 2014 Brian Barnes * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later @@ -87,4 +84,4 @@ class core_calendar_export_form extends moodleform { $buttons[] = $mform->createElement('submit', 'export', get_string('exportbutton', 'calendar')); $mform->addGroup($buttons); } -} \ No newline at end of file +} -- 2.43.0