-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide overwrites from disabled apps list on upgrade
If an incompatible app is enabled manually, it is added to the "app_install_overwrite" array in config.php. Nextcloud upgrades won't disable any app in this array, but they were still shown on the upgrade page and logs as being disabled. This commit assures that only apps which are really disabled, i.e. which are not in the "app_install_overwrite" array, are shown and logged as disabled during upgrades. Signed-off-by: MichaIng <[email protected]>
- Loading branch information
Showing
3 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ | |
* @author Lukas Reschke <[email protected]> | ||
* @author MartB <[email protected]> | ||
* @author Michael Gapczynski <[email protected]> | ||
* @author MichaIng <[email protected]> | ||
* @author Morris Jobke <[email protected]> | ||
* @author Owen Winkler <[email protected]> | ||
* @author Phil Davis <[email protected]> | ||
|
@@ -385,11 +386,16 @@ private static function printUpgradePage(\OC\SystemConfig $systemConfig): void { | |
$ocVersion = \OCP\Util::getVersion(); | ||
$ocVersion = implode('.', $ocVersion); | ||
$incompatibleApps = $appManager->getIncompatibleApps($ocVersion); | ||
$incompatibleOverwrites = $systemConfig->getValue('app_install_overwrite', []); | ||
$incompatibleShippedApps = []; | ||
$incompatibleDisabledApps = []; | ||
foreach ($incompatibleApps as $appInfo) { | ||
if ($appManager->isShipped($appInfo['id'])) { | ||
$incompatibleShippedApps[] = $appInfo['name'] . ' (' . $appInfo['id'] . ')'; | ||
} | ||
if (!in_array($appInfo['id'], $incompatibleOverwrites)) { | ||
$incompatibleDisabledApps[] = $appInfo; | ||
} | ||
} | ||
|
||
if (!empty($incompatibleShippedApps)) { | ||
|
@@ -399,7 +405,7 @@ private static function printUpgradePage(\OC\SystemConfig $systemConfig): void { | |
} | ||
|
||
$tmpl->assign('appsToUpgrade', $appManager->getAppsNeedingUpgrade($ocVersion)); | ||
$tmpl->assign('incompatibleAppsList', $incompatibleApps); | ||
$tmpl->assign('incompatibleAppsList', $incompatibleDisabledApps); | ||
try { | ||
$defaults = new \OC_Defaults(); | ||
$tmpl->assign('productName', $defaults->getName()); | ||
|