drupal_get_schema_versions
includes/install.inc, строка 38
- Версии
- 5 – 6
drupal_get_schema_versions($module)
Returns an array of available schema versions for a module.
Параметры
$module
A module name.
Возвращаемое значение
If the module has updates, an array of available updates sorted by version.
Otherwise, FALSE
.
Код
<?php
function drupal_get_schema_versions($module) {
$updates = array();
$functions = get_defined_functions();
foreach ($functions['user'] as $function) {
if (strpos($function, $module .'_update_') === 0) {
$version = substr($function, strlen($module .'_update_'));
if (is_numeric($version)) {
$updates[] = $version;
}
}
}
if (count($updates) == 0) {
return FALSE;
}
sort($updates, SORT_NUMERIC);
return $updates;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии