installed takes precedence over deprecated unless in actin centre

This commit is contained in:
Squidly271 2022-05-07 09:46:23 -04:00
parent e32ce439d5
commit 3412630563
4 changed files with 13 additions and 8 deletions

View File

@ -2,7 +2,7 @@ c553881600c51459abaa336c920cd923 ./Apps.page
4e55f7483b661af21a25b677179baffe ./CA_notices.page
42a1658a916a3a3eed2a9f2af80603c4 ./ca_settings.page
e718d7825dbdc96a17a915079222b098 ./default.cfg
ac88336a82f361a128b5dd7e43237072 ./include/exec.php
5225ce65e180f34f1dd810c0f35f6945 ./include/exec.php
d5ba81dbd93c7b149dec96def31107e9 ./include/helpers.php
fc87642746ba4f324537bc381b78e982 ./include/paths.php
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
@ -21,4 +21,4 @@ da3b4f9b73c5c3bf65be6c42d68b51f9 ./scripts/showStatistics.php
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
ce8e45452d3b63b5943b6f39c817bbf9 ./skins/Narrow/css.php
c4d6ce8de3baff1c9de2b7f348b2f340 ./skins/Narrow/skin.html
5a32f61db7136c31198b3ca194bc688c ./skins/Narrow/skin.php
3267c8bca2f623796576e11dd9fcb86a ./skins/Narrow/skin.php

View File

@ -1081,6 +1081,9 @@ function previous_apps() {
if ( !$o['Blacklist'] && !$o['Deprecated'] && !$o['actionCenter'] )
continue;
}
if ( $installed == "action" )
$o['actionCenter'] = true;
$displayed[] = $o;
}
}
@ -1160,6 +1163,8 @@ function previous_apps() {
if ( $installed == "action" && !$template['Blacklist'] && !$template['Deprecated'] && !$template['actionCenter'] )
continue;
if ( $installed == "action" )
$template['actionCenter'] = true;
$displayed[] = $template;
}
}

View File

@ -1198,7 +1198,12 @@ function displayCard($template) {
$flagTextStart = " ";
$flagTextEnd = " ";
}
if ( $Blacklist ) {
if ( ($Installed || $Uninstall) && !$actionCenter) {
$card .= "
<div class='installedCardBackground'>
<div class='installedCardText ca_center'>".tr("INSTALLED")."</div>
</div>";
} elseif ( $Blacklist ) {
$card .= "
<div class='warningCardBackground'>
<div class='betaPopupText ca_center' title='".tr("This application template / has been blacklisted")."'>".tr("Blacklisted")."$flagTextEnd</div>
@ -1228,11 +1233,6 @@ function displayCard($template) {
<div class='betaCardBackground'>
<div class='installedCardText ca_center'>".tr("UPDATED")."</div>
</div>";
} elseif ( $Installed || $Uninstall) {
$card .= "
<div class='installedCardBackground'>
<div class='installedCardText ca_center'>".tr("INSTALLED")."</div>
</div>";
} elseif ( $Official ) {
$card .= "
<div class='officialCardBackground'>