hopefully better update handling - never update the current DB version or continue with other updates if there was a failure of any individual update.

This commit is contained in:
friendica 2012-07-23 15:57:40 -07:00
commit 0d631cc08c
2 changed files with 10 additions and 5 deletions

View file

@ -471,6 +471,9 @@ function admin_page_dbsync(&$a) {
if($a->argc > 3 && intval($a->argv[3]) && $a->argv[2] === 'mark') {
set_config('database', 'update_' . intval($a->argv[3]), 'success');
$curr = get_config('system','build');
if(intval($curr) == intval($a->argv[3]))
set_config('system','build',intval($curr) + 1);
info( t('Update has been marked successful') . EOL);
goaway($a->get_baseurl(true) . '/admin/dbsync');
}