diff --git a/setup/applications.php b/setup/applications.php index 954cc53ce8..35fdeb7fea 100644 --- a/setup/applications.php +++ b/setup/applications.php @@ -446,7 +446,7 @@ else case 'U': $setup_tpl->set_var('instimg','incomplete.png'); $setup_tpl->set_var('instalt',lang('Not Completed')); - if (!@$value['currentver']) + if (empty($value['currentver']) || $value['currentver'] === 'uninstalled') { if ($value['tables'] && $GLOBALS['egw_setup']->detection->check_app_tables($value['name'],True)) { diff --git a/setup/inc/class.setup_cmd.inc.php b/setup/inc/class.setup_cmd.inc.php index f0caa78536..7aa794d0f6 100644 --- a/setup/inc/class.setup_cmd.inc.php +++ b/setup/inc/class.setup_cmd.inc.php @@ -319,7 +319,8 @@ abstract class setup_cmd extends admin_cmd self::$apps_to_upgrade = self::$apps_to_install = array(); foreach($setup_info as $app => $data) { - if ($data['currentver'] && $data['version'] && $data['version'] != 'deleted' && $data['version'] != $data['currentver']) + if ($data['currentver'] && $data['version'] && $data['version'] != 'deleted' && $data['version'] != $data['currentver'] && + $data['currentversion'] !== 'uninstalled') { self::$apps_to_upgrade[] = $app; } @@ -366,7 +367,7 @@ abstract class setup_cmd extends admin_cmd $ret = array_filter(self::$apps_to_install, function($app) { global $setup_info; - return $setup_info[$app]['autoinstall']; + return !empty($setup_info[$app]['autoinstall']) && !isset($setup_info[$app]['currentversion']); }); //error_log(__METHOD__."() apps_to_install=".array2string(self::$apps_to_install).' returning '.array2string($ret)); return $ret; diff --git a/setup/inc/class.setup_detection.inc.php b/setup/inc/class.setup_detection.inc.php index cda523d231..fc144ffd5f 100755 --- a/setup/inc/class.setup_detection.inc.php +++ b/setup/inc/class.setup_detection.inc.php @@ -62,7 +62,7 @@ class setup_detection /* one of these tables exists. checking for post/pre beta version */ if($GLOBALS['egw_setup']->applications_table != 'applications') { - foreach($GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->applications_table, '*', 'app_enabled != -1', __LINE__, __FILE__) as $row) + foreach($GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->applications_table, '*', false, __LINE__, __FILE__) as $row) { $app = $row['app_name']; if (!isset($setup_info[$app])) // app source no longer there diff --git a/setup/index.php b/setup/index.php index 9130d713bd..8e94db0580 100644 --- a/setup/index.php +++ b/setup/index.php @@ -484,7 +484,7 @@ switch($GLOBALS['egw_info']['setup']['stage']['db']) $to_upgrade = $to_install = array(); foreach($setup_info as $app => $data) { - if ($data['currentver'] && $data['version'] && $data['version'] != $data['currentver']) + if (!empty($data['currentver']) && $data['currentver'] !== 'uninstalled' && $data['version'] && $data['version'] != $data['currentver']) { $to_upgrade[] = lang(!empty($data['title']) ? $data['title'] : $app); $setup_tpl->set_var('apps_status_img',$incomplete);