The database structure is now checked ad the admin summary page

This commit is contained in:
Michael 2017-05-28 08:39:41 +00:00
parent 9418c000a1
commit 104acec09c
2 changed files with 19 additions and 4 deletions

View file

@ -8,6 +8,10 @@ require_once("include/text.php");
define('NEW_UPDATE_ROUTINE_VERSION', 1170);
const DB_UPDATE_NOT_CHECKED = 0; // Database check wasn't executed before
const DB_UPDATE_SUCCESSFUL = 1; // Database check was successful
const DB_UPDATE_FAILED = 2; // Database check failed
/*
* Converts all tables from MyISAM to InnoDB
*/
@ -480,6 +484,12 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
Config::set('system', 'maintenance_reason', '');
}
if ($errors) {
Config::set('system', 'dbupdate', DB_UPDATE_FAILED);
} else {
Config::set('system', 'dbupdate', DB_UPDATE_SUCCESSFUL);
}
return $errors;
}