Moved the functions update_db and run_update_function to a Friendica\Core\Update class

This commit is contained in:
Philipp Holzer 2018-10-06 00:53:13 +02:00
parent c6ce9ddaa4
commit e876adef8f
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
4 changed files with 130 additions and 7 deletions

View file

@ -3,6 +3,7 @@
namespace Friendica\Core\Console;
use Friendica\Core;
use Friendica\Core\Update;
use Friendica\Database\DBA;
use Friendica\Database\DBStructure;
use RuntimeException;
@ -80,7 +81,7 @@ HELP;
// run the pre_update_nnnn functions in update.php
for ($x = $stored; $x < $current; $x ++) {
$r = run_update_function($x, 'pre_update');
$r = Update::runUpdateFunction($x, 'pre_update');
if (!$r) {
break;
}
@ -90,7 +91,7 @@ HELP;
// run the update_nnnn functions in update.php
for ($x = $stored; $x < $current; $x ++) {
$r = run_update_function($x, 'update');
$r = Update::runUpdateFunction($x, 'update');
if (!$r) {
break;
}