function upgrade_assist_install in Upgrade Status 6
Implements hook_install().
File
- upgrade_assist/
upgrade_assist.install, line 11 - Installation functions for Upgrade Assist.
Code
function upgrade_assist_install() {
// Ensure that potential constants are defined.
drupal_load('module', 'system');
// Figure out current major versions.
$core = defined('DRUPAL_CORE_COMPATIBILITY') ? DRUPAL_CORE_COMPATIBILITY : VERSION;
preg_match('@^(\\d+)@', $core, $matches);
$core = (int) $matches[0];
switch ($core) {
case 6:
$core_current = db_result(db_query("SELECT schema_version FROM {system} WHERE type = 'module' AND name = 'system'"));
break;
case 7:
$core_current = db_query("SELECT schema_version FROM {system} WHERE type = 'module' AND name = 'system'")
->fetchField();
break;
}
$core_current = (int) $core_current[0];
variable_set('upgrade_assist_core', $core);
variable_set('upgrade_assist_core_current', $core_current);
}