function drupal_get_installed_schema_version in Drupal 5
Same name and namespace in other branches
- 8 core/includes/schema.inc \drupal_get_installed_schema_version()
- 4 includes/install.inc \drupal_get_installed_schema_version()
- 6 includes/install.inc \drupal_get_installed_schema_version()
- 7 includes/install.inc \drupal_get_installed_schema_version()
- 9 core/includes/schema.inc \drupal_get_installed_schema_version()
Returns the currently installed schema version for a module.
Parameters
$module: A module name.
Return value
The currently installed schema version.
7 calls to drupal_get_installed_schema_version()
- drupal_install_modules in includes/
install.inc - Calls the install function and updates the system table for a given list of modules.
- system_modules_submit in modules/
system/ system.module - Submit callback; handles modules form submission.
- system_requirements in modules/
system/ system.install - Test and report Drupal installation requirements.
- update_fix_sessions in ./
update.php - System update 130 changes the sessions table, which breaks the update script's ability to use session variables. This changes the table appropriately.
- update_fix_watchdog in ./
update.php - System update 142 changes the watchdog table, which breaks the update script's ability to use logging. This changes the table appropriately.
File
- includes/
install.inc, line 64
Code
function drupal_get_installed_schema_version($module, $reset = FALSE) {
static $versions = array();
if ($reset) {
$versions = array();
}
if (!$versions) {
$versions = array();
$result = db_query("SELECT name, schema_version FROM {system} WHERE type = 'module'");
while ($row = db_fetch_object($result)) {
$versions[$row->name] = $row->schema_version;
}
}
return $versions[$module];
}