Updated the code responsible for preventing internal access to certain files

This commit is contained in:
Mark Nelson 2013-04-10 17:17:19 +08:00
parent 31168708bb
commit 8b3954cea7
12 changed files with 14 additions and 14 deletions

View file

@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
require_once("HTML/QuickForm/text.php"); require_once("HTML/QuickForm/text.php");

View file

@ -15,9 +15,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if (!defined('MOODLE_INTERNAL')) { defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once($CFG->dirroot . '/course/moodleform_mod.php'); require_once($CFG->dirroot . '/course/moodleform_mod.php');
require_once($CFG->dirroot . '/mod/customcert/lib.php'); require_once($CFG->dirroot . '/mod/customcert/lib.php');

View file

@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
require_once($CFG->dirroot . '/mod/customcert/elements/element.class.php'); require_once($CFG->dirroot . '/mod/customcert/elements/element.class.php');

View file

@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
$plugin->version = 2013031300; $plugin->version = 2013031300;
$plugin->requires = 2012112900; $plugin->requires = 2012112900;

View file

@ -24,7 +24,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
class customcert_element_base { class customcert_element_base {

View file

@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
require_once($CFG->dirroot . '/mod/customcert/elements/element.class.php'); require_once($CFG->dirroot . '/mod/customcert/elements/element.class.php');
require_once($CFG->dirroot . '/grade/lib.php'); require_once($CFG->dirroot . '/grade/lib.php');

View file

@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
$plugin->version = 2013031300; $plugin->version = 2013031300;
$plugin->requires = 2012112900; $plugin->requires = 2012112900;

View file

@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
require_once($CFG->dirroot . '/mod/customcert/elements/element.class.php'); require_once($CFG->dirroot . '/mod/customcert/elements/element.class.php');

View file

@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
$plugin->version = 2013022901; $plugin->version = 2013022901;
$plugin->requires = 2012112900; $plugin->requires = 2012112900;

View file

@ -24,6 +24,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
/** /**
* Add customcert instance. * Add customcert instance.
* *

View file

@ -15,9 +15,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if (!defined('MOODLE_INTERNAL')) { defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once($CFG->dirroot.'/course/moodleform_mod.php'); require_once($CFG->dirroot.'/course/moodleform_mod.php');
require_once($CFG->dirroot.'/mod/customcert/lib.php'); require_once($CFG->dirroot.'/mod/customcert/lib.php');

View file

@ -24,6 +24,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late
*/ */
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
$module->version = 2013022101; // The current module version (Date: YYYYMMDDXX) $module->version = 2013022101; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2012062500; // Requires this Moodle version $module->requires = 2012062500; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs) $module->cron = 0; // Period for cron to check this module (secs)