Browse Source

slightly better check - there's probably a cfg var I could check here instead of using try/catch

MOODLE_26_STABLE
Dan Marsden 12 years ago
parent
commit
fe773fcdc6
  1. 11
      version.php

11
version.php

@ -33,13 +33,16 @@ $module->component = 'mod_attendance';
// TODO: remove this asap.
if (defined('MOODLE_INTERNAL')) { // Only run if config.php has already been included.
global $DB;
$moduleexists = false;
try {
if ($DB->record_exists('modules', array('name' =>'attforblock'))) {
require_once('locallib.php');
attforblock_upgrade();
}
$moduleexists = $DB->record_exists('modules', array('name' =>'attforblock'));
} catch (Exception $e) {
// Probably a fresh install - modules table doesn't exist
}
if ($moduleexists) {
require_once('locallib.php');
attforblock_upgrade();
}
}

Loading…
Cancel
Save