// run new update routine
// it update the structure in one call
- $retval = DBStructure::updateStructure(false, true);
+ $retval = DBStructure::update(false, true);
if ($retval) {
DBStructure::updateFail(
DB_UPDATE_VERSION,
}
if (Config::get('system', 'dbupdate', DB_UPDATE_NOT_CHECKED) == DB_UPDATE_NOT_CHECKED) {
- DBStructure::updateStructure(false, true);
+ DBStructure::update(false, true);
}
if (Config::get('system', 'dbupdate') == DB_UPDATE_FAILED) {
$showwarning = true;
}
if (($a->argc > 2) && (intval($a->argv[2]) || ($a->argv[2] === 'check'))) {
- $retval = DBStructure::updateStructure(false, true);
+ $retval = DBStructure::update(false, true);
if (!$retval) {
$o .= sprintf(t("Database structure update %s was successfully applied."), DB_UPDATE_VERSION) . "<br />";
Config::set('database', 'dbupdate_' . DB_UPDATE_VERSION, 'success');
}
function load_database() {
- $errors = DBStructure::updateStructure(false, true);
+ $errors = DBStructure::update(false, true);
return $errors;
}
if ($_SERVER["argc"] == 2) {
switch ($_SERVER["argv"][1]) {
case "dryrun":
- DBStructure::updateStructure(true, false);
+ DBStructure::update(true, false);
return;
case "update":
- DBStructure::updateStructure(true, true);
+ DBStructure::update(true, true);
$build = Config::get('system','build');
if (!x($build)) {
return t('Errors encountered performing database changes: ').$message.EOL;
}
- public static function updateStructure($verbose, $action, $tables = null, $definition = null) {
+ public static function update($verbose, $action, $tables = null, $definition = null) {
if ($action) {
Config::set('system', 'maintenance', 1);
Config::set('system', 'maintenance_reason', sprintf(t(': Database update'), DBM::date().' '.date('e')));
return($database);
}
-}
\ No newline at end of file
+}