mirror of
https://github.com/friendica/friendica
synced 2025-04-27 20:30:13 +00:00
We now have a pre update script (#5425)
* We now have a pre update script * Some optimized stuff
This commit is contained in:
parent
b26da6096b
commit
4bbcb61a9e
3 changed files with 40 additions and 19 deletions
|
@ -69,8 +69,6 @@ HELP;
|
|||
$output = DBStructure::update(true, false);
|
||||
break;
|
||||
case "update":
|
||||
$output = DBStructure::update(true, true);
|
||||
|
||||
$build = Core\Config::get('system', 'build');
|
||||
if (empty($build)) {
|
||||
Core\Config::set('system', 'build', DB_UPDATE_VERSION);
|
||||
|
@ -80,9 +78,19 @@ HELP;
|
|||
$stored = intval($build);
|
||||
$current = intval(DB_UPDATE_VERSION);
|
||||
|
||||
// run any left update_nnnn functions in update.php
|
||||
// run the pre_update_nnnn functions in update.php
|
||||
for ($x = $stored; $x < $current; $x ++) {
|
||||
$r = run_update_function($x);
|
||||
$r = run_update_function($x, 'pre_update');
|
||||
if (!$r) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$output = DBStructure::update(true, true);
|
||||
|
||||
// run the update_nnnn functions in update.php
|
||||
for ($x = $stored; $x < $current; $x ++) {
|
||||
$r = run_update_function($x, 'update');
|
||||
if (!$r) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue