diff --git a/auth/cas/auth.php b/auth/cas/auth.php index 242e9b0188e..7e8e5d02c13 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -26,9 +26,7 @@ * @package auth_cas */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->dirroot.'/auth/ldap/auth.php'); require_once($CFG->dirroot.'/auth/cas/CAS/CAS.php'); diff --git a/auth/email/auth.php b/auth/email/auth.php index 4c4db6d99b6..9ac59bdaa58 100644 --- a/auth/email/auth.php +++ b/auth/email/auth.php @@ -22,9 +22,7 @@ * @package auth_email */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php'); diff --git a/auth/fc/auth.php b/auth/fc/auth.php index cec4fcf6579..75c8bd073b5 100644 --- a/auth/fc/auth.php +++ b/auth/fc/auth.php @@ -23,9 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php'); diff --git a/auth/imap/auth.php b/auth/imap/auth.php index 88ac98c9631..442f93e2488 100644 --- a/auth/imap/auth.php +++ b/auth/imap/auth.php @@ -23,9 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php'); diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index 3858c7b832a..d32f6bdae5b 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -24,9 +24,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); // See http://support.microsoft.com/kb/305144 to interprete these values. if (!defined('AUTH_AD_ACCOUNTDISABLE')) { diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php index dd8ff48d582..db7328bd9f8 100644 --- a/auth/mnet/auth.php +++ b/auth/mnet/auth.php @@ -23,9 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php'); diff --git a/auth/nntp/auth.php b/auth/nntp/auth.php index d08d30b45df..c2ad28319db 100644 --- a/auth/nntp/auth.php +++ b/auth/nntp/auth.php @@ -23,9 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php'); diff --git a/auth/nologin/auth.php b/auth/nologin/auth.php index f3a4a99445d..29f018e4ddc 100644 --- a/auth/nologin/auth.php +++ b/auth/nologin/auth.php @@ -22,9 +22,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php'); diff --git a/auth/none/auth.php b/auth/none/auth.php index 0affa429722..9d3bfc2d2ff 100644 --- a/auth/none/auth.php +++ b/auth/none/auth.php @@ -22,9 +22,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php'); diff --git a/auth/pam/auth.php b/auth/pam/auth.php index 590fff8d707..fd76a09ef84 100644 --- a/auth/pam/auth.php +++ b/auth/pam/auth.php @@ -36,9 +36,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php'); diff --git a/auth/pop3/auth.php b/auth/pop3/auth.php index 2d8d992f2a6..6b4bdff0844 100644 --- a/auth/pop3/auth.php +++ b/auth/pop3/auth.php @@ -23,9 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php'); diff --git a/auth/radius/auth.php b/auth/radius/auth.php index 66c4a00c251..a74369e6afb 100644 --- a/auth/radius/auth.php +++ b/auth/radius/auth.php @@ -26,9 +26,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php'); diff --git a/auth/shibboleth/auth.php b/auth/shibboleth/auth.php index a9ed477306d..02b3529ef3d 100644 --- a/auth/shibboleth/auth.php +++ b/auth/shibboleth/auth.php @@ -26,9 +26,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php'); diff --git a/auth/webservice/auth.php b/auth/webservice/auth.php index 1a83e6f26fb..1fc1e997e6d 100644 --- a/auth/webservice/auth.php +++ b/auth/webservice/auth.php @@ -23,9 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir.'/authlib.php');