X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fdbstructure.php;h=413395905d10aabb1658b98154d3afe3892b92c7;hb=81c87885cf61247608a0fa8e738707510e737ace;hp=c9c37c9390bcca0f45153d0cd33cc6744ced9320;hpb=192a5e254a84a6beb755f50f5e2975bd910dcaf3;p=friendica.git diff --git a/include/dbstructure.php b/include/dbstructure.php index c9c37c9390..413395905d 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -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; }