dbstructure now switches in the maintenance mode when updating

This commit is contained in:
Michael Vogel 2016-10-02 13:52:52 +00:00
parent fa33f94b29
commit 6d16c39b7e
3 changed files with 18 additions and 0 deletions

View file

@ -126,6 +126,9 @@ function print_structure($database, $charset) {
function update_structure($verbose, $action, $tables=null, $definition=null) {
global $a, $db;
if ($action)
set_config('system', 'maintenance', 1);
if (isset($a->config["system"]["db_charset"]))
$charset = $a->config["system"]["db_charset"];
else
@ -241,6 +244,9 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
}
}
if ($action)
set_config('system', 'maintenance', 0);
return $errors;
}