mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-16 03:30:49 +01:00
made the update strategy of setup_process a bit more flexible: update dont need to be in order in the tables_update file any more: if the next update is not the one we need, we search for the right one and start again from there. This is needed to be able to import phpGW versions from after the fork and it simplyfies the update-scripts a lot now.
This commit is contained in:
parent
38aacb3de2
commit
b68f289d87
@ -643,7 +643,7 @@
|
||||
@reset($test);
|
||||
while(list($x,$value) = @each($test))
|
||||
{
|
||||
$currentver = $setup_info[$key]['currentver'];
|
||||
$this->currentversion = $currentver = $setup_info[$key]['currentver'];
|
||||
|
||||
/* build upgrade function name */
|
||||
$function = $appname . '_upgrade' . str_replace(".", '_', $value);
|
||||
@ -718,6 +718,16 @@
|
||||
$GLOBALS['phpgw_setup']->register_app($appname);
|
||||
$GLOBALS['phpgw_setup']->register_hooks($appname);
|
||||
}
|
||||
// is the next update the one we need?
|
||||
if ($success && $test[$x+1] != $success &&
|
||||
($num = array_search($success,$test)) !== False)
|
||||
{
|
||||
// do we have the needed update somewhere else in the row?
|
||||
// if yes, position the array-pointer just before that update and continue
|
||||
reset($test);
|
||||
while((list($x,$value) = each($test)) && $x < $num-1);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -737,6 +747,17 @@
|
||||
if($DEBUG) { echo '<br>process->upgrade(): running baseline delta only: ' . $function . '...'; }
|
||||
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = True;
|
||||
$success = $function();
|
||||
|
||||
// is the next update the one we need?
|
||||
if ($success && $test[$x+1] != $success &&
|
||||
($num = array_search($success,$test)) !== False)
|
||||
{
|
||||
// do we have the needed update somewhere else in the row?
|
||||
// if yes, position the array-pointer just before that update and continue
|
||||
reset($test);
|
||||
while((list($x,$value) = each($test)) && $x < $num-1);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user