From df10e6d167711b69695e0d6979323c97bf70ef21 Mon Sep 17 00:00:00 2001 From: justinhunt Date: Fri, 26 Oct 2018 09:36:59 +0900 Subject: [PATCH] code tidy up --- classes/generico_utils.php | 25 +++++++++++++++++++++---- classes/presets_control.php | 25 +++++++++++++++++++++---- classes/template_script_generator.php | 27 ++++++++++++++++++++++----- db/upgrade.php | 3 +++ settings.php | 3 ++- 5 files changed, 69 insertions(+), 14 deletions(-) diff --git a/classes/generico_utils.php b/classes/generico_utils.php index eda1663..a38fb08 100644 --- a/classes/generico_utils.php +++ b/classes/generico_utils.php @@ -1,13 +1,30 @@ . + /** - * Created by PhpStorm. - * User: justin - * Date: 17/03/24 - * Time: 15:04 + * @package filter + * @subpackage generico + * @copyright 2014 Justin Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + namespace filter_generico; +defined('MOODLE_INTERNAL') || die; class generico_utils { diff --git a/classes/presets_control.php b/classes/presets_control.php index feddcfc..cc27c4a 100644 --- a/classes/presets_control.php +++ b/classes/presets_control.php @@ -1,13 +1,30 @@ . + /** - * Created by PhpStorm. - * User: justin - * Date: 17/03/24 - * Time: 14:58 + * @package filter + * @subpackage generico + * @copyright 2014 Justin Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace filter_generico; +defined('MOODLE_INTERNAL') || die; + require_once($CFG->libdir . '/adminlib.php'); class presets_control extends \admin_setting diff --git a/classes/template_script_generator.php b/classes/template_script_generator.php index 8666761..133e686 100644 --- a/classes/template_script_generator.php +++ b/classes/template_script_generator.php @@ -1,14 +1,31 @@ . + /** - * Created by PhpStorm. - * User: justin - * Date: 17/03/24 - * Time: 14:57 + * @package filter + * @subpackage generico + * @copyright 2014 Justin Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -namespace filter_generico; +namespace filter_generico; +defined('MOODLE_INTERNAL') || die; class template_script_generator { diff --git a/db/upgrade.php b/db/upgrade.php index a28c45e..83151a4 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -23,6 +23,9 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die(); + + /** * @param int $oldversion the version we are upgrading from * @return bool result diff --git a/settings.php b/settings.php index 4fe5d58..f94778b 100644 --- a/settings.php +++ b/settings.php @@ -22,9 +22,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die; $settings = null; -defined('MOODLE_INTERNAL') || die; + if (is_siteadmin()) { global $PAGE;