mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-09 01:25:22 +01:00
facilitate downgrade, if supported by "update" scripts: run downgrades automatic
This commit is contained in:
parent
1b2b69a025
commit
5c832771ee
@ -123,7 +123,7 @@ class setup_detection
|
||||
* V Version mismatch at end of upgrade (Not used, proposed only)
|
||||
* M Missing files at start of upgrade (Not used, proposed only)
|
||||
*/
|
||||
function compare_versions($setup_info)
|
||||
function compare_versions($setup_info,$try_downgrade=false)
|
||||
{
|
||||
foreach($setup_info as $key => $value)
|
||||
{
|
||||
@ -132,7 +132,8 @@ class setup_detection
|
||||
if(!( (@$value['status'] == 'F') || (@$value['status'] == 'C') ))
|
||||
{
|
||||
//if ($setup_info[$key]['currentver'] > $setup_info[$key]['version'])
|
||||
if($GLOBALS['egw_setup']->amorethanb($value['currentver'],@$value['version']))
|
||||
if(!$try_downgrade && $GLOBALS['egw_setup']->amorethanb($value['currentver'],@$value['version']) ||
|
||||
$value['version'] == 'deleted')
|
||||
{
|
||||
$setup_info[$key]['status'] = 'V';
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ class setup_process
|
||||
if($DEBUG) { echo '<br>process->pass(): #' . $i . ' for ' . $method . ' processing' . "\n"; }
|
||||
/* Check current versions and dependencies */
|
||||
$setup_info = $GLOBALS['egw_setup']->detection->get_db_versions($setup_info);
|
||||
$setup_info = $GLOBALS['egw_setup']->detection->compare_versions($setup_info);
|
||||
$setup_info = $GLOBALS['egw_setup']->detection->compare_versions($setup_info,true);
|
||||
//_debug_array($setup_info);exit;
|
||||
$setup_info = $GLOBALS['egw_setup']->detection->check_depends($setup_info);
|
||||
//if($i==2) { _debug_array($passed);exit; }
|
||||
|
Loading…
Reference in New Issue
Block a user