Skip to content

Commit

Permalink
MDL-24726 prevent cron execution when upgrade pending
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Oct 18, 2010
1 parent fd546aa commit 4c56c7b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/cronlib.php
Expand Up @@ -32,6 +32,11 @@ function cron_run() {
exit(1);
}

if (moodle_needs_upgrading()) {
echo "Moodle upgrade pending, cron execution suspended.\n";
exit(1);
}

require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/gradelib.php');

Expand Down

0 comments on commit 4c56c7b

Please sign in to comment.