Skip to content

Commit

Permalink
fixes #1836 no longer use obsolete.list for minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
plegall committed Dec 21, 2022
1 parent 23a8d1d commit 00d5c87
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions admin/include/updates.class.php
Expand Up @@ -463,12 +463,15 @@ static function upgrade_to($upgrade_to, &$step, $check_current_version=true)
redirect(get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__)));
}

$obsolete_list = null;

if ($step == 2)
{
$code = get_branch_from_version(PHPWG_VERSION).'.x_to_'.$upgrade_to;
$dl_code = str_replace(array('.', '_'), '', $code);
$remove_path = $code;
$obsolete_list = 'obsolete.list';
// no longer try to delete files on a minor upgrade
// $obsolete_list = 'obsolete.list';
}
else
{
Expand Down Expand Up @@ -542,7 +545,11 @@ static function upgrade_to($upgrade_to, &$step, $check_current_version=true)

if (empty($error))
{
self::process_obsolete_list($obsolete_list);
if (!empty($obsolete_list))
{
self::process_obsolete_list($obsolete_list);
}

deltree(PHPWG_ROOT_PATH.$conf['data_location'].'update');
invalidate_user_cache(true);
if ($step == 2)
Expand Down

0 comments on commit 00d5c87

Please sign in to comment.