Don't allow renamed containers in Installed / previous to be pinned

They are effectively outside of CA's control
This commit is contained in:
Squidly271 2022-04-16 17:13:13 -04:00
parent 0fa4fe5033
commit 2db01f617c
4 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,7 @@
4e55f7483b661af21a25b677179baffe ./CA_notices.page
42a1658a916a3a3eed2a9f2af80603c4 ./ca_settings.page
e718d7825dbdc96a17a915079222b098 ./default.cfg
dc9858be7384f111844595e45b4e2a18 ./include/exec.php
cc5406a6075f989c2452b7b473b445d1 ./include/exec.php
d5ba81dbd93c7b149dec96def31107e9 ./include/helpers.php
d9b0dc98ee598d44633341ac199a43e0 ./include/paths.php
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
@ -21,4 +21,4 @@ da3b4f9b73c5c3bf65be6c42d68b51f9 ./scripts/showStatistics.php
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
0254b0a66007c3f6e32e7d259e8ee443 ./skins/Narrow/css.php
0d6d0fd063af8b0ec4664a93401d83a0 ./skins/Narrow/skin.html
5a6f8a4600b3846ddde94812f3e19fdb ./skins/Narrow/skin.php
d41b54af02504d2dbc6c9509f699c251 ./skins/Narrow/skin.php

View File

@ -1035,6 +1035,8 @@ function previous_apps() {
$o['CardDescription'] = $tmpOvr;
$o['InstallPath'] = $tempPath;
$o['SortName'] = str_replace("-"," ",$installedName);
if ( $installedName !== $file[$searchResult]['Name'] )
$o['NoPin'] = true; # This is renamed and effectively outside of CA's control
}
break;
}
@ -1091,6 +1093,7 @@ function previous_apps() {
$o['InstallPath'] = $tempPath;
$o['Name'] = $tempName;
$o['SortName'] = str_replace("-"," ",$o['Name']);
$o['NoPin'] = true;
break;
}
}

View File

@ -1264,7 +1264,7 @@ function displayPopup($template) {
elseif ( count($supportContext) )
$card.= "<div class='supportPopup' id='supportPopup'><span class='ca_fa-support'> ".tr("Support")."</div>";
$card .= $LanguagePack != "en_US" && ! $Blacklist ? "<div class='pinPopup $pinnedClass' title='$pinnedTitle' data-repository='$Repository' data-name='$SortName'><span>$pinned</span></div>" : "";
$card .= ($LanguagePack != "en_US" && ! $Blacklist && ! $NoPin) ? "<div class='pinPopup $pinnedClass' title='$pinnedTitle' data-repository='$Repository' data-name='$SortName'><span>$pinned</span></div>" : "";
if ( ! $caSettings['dockerRunning'] && (! $Plugin && ! $Language) ) {
$card .= "<div class='ca_red'>".tr("Docker Service Not Enabled - Only Plugins Available To Be Installed Or Managed")."</div>";
}