Skip to content

Commit

Permalink
Added a new defined constant to moodlelib.php, to be used by scripts …
Browse files Browse the repository at this point in the history
…with

php extensions that should not be called directly.  See SC19

Constant:   MOODLE_INTERNAL
  • Loading branch information
moodler committed Dec 12, 2004
1 parent 470dda0 commit b86e528
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/javascript.php
@@ -1,3 +1,5 @@
<?php defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.'); ?>

<script language="JavaScript" type="text/javascript"

src="<?php echo "$CFG->wwwroot/lib/overlib.js" ?>"></script>
Expand Down
3 changes: 3 additions & 0 deletions lib/moodlelib.php
Expand Up @@ -36,6 +36,9 @@

/// CONSTANTS /////////////////////////////////////////////////////////////

define('MOODLE_INTERNAL', true); // Used by some scripts to check they
// are being called by Moodle

define('NOGROUPS', 0);
define('SEPARATEGROUPS', 1);
define('VISIBLEGROUPS', 2);
Expand Down

0 comments on commit b86e528

Please sign in to comment.