Don't allow 2nd install of non ca templates

There's not a "default" template to base this on
This commit is contained in:
Squidly271 2022-04-19 10:24:21 -04:00
parent d84893c93b
commit f1df1daaf2
3 changed files with 8 additions and 6 deletions

View File

@ -21,4 +21,4 @@ da3b4f9b73c5c3bf65be6c42d68b51f9 ./scripts/showStatistics.php
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
0254b0a66007c3f6e32e7d259e8ee443 ./skins/Narrow/css.php
0bdefa4e915c02ed3310c39eb5a1cef5 ./skins/Narrow/skin.html
505165ab6748f4ff5459c516d6572dd6 ./skins/Narrow/skin.php
6df7b43e58a2bfedc4ee7325859353f8 ./skins/Narrow/skin.php

View File

@ -137,10 +137,12 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
$actionsContext[] = array("icon"=>"ca_fa-update","text"=>tr("Update"),"action"=>"updateDocker('$name');");
}
if ( $caSettings['defaultReinstall'] == "true" && ! $template['Blacklist']) {
if ( $template['BranchID'] )
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Install second instance"),"action"=>"displayTags('{$template['ID']}',true,'".str_replace(" "," ",htmlspecialchars($installComment))."','".portsUsed($template)."');");
else
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Install second instance"),"action"=>"popupInstallXML('".addslashes($template['Path'])."','second','".str_replace(" "," ",htmlspecialchars($installComment))."','".portsUsed($template)."');");
if ( $template['ID'] !== false ) {
if ( $template['BranchID'] )
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Install second instance"),"action"=>"displayTags('{$template['ID']}',true,'".str_replace(" "," ",htmlspecialchars($installComment))."','".portsUsed($template)."');");
else
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Install second instance"),"action"=>"popupInstallXML('".addslashes($template['Path'])."','second','".str_replace(" "," ",htmlspecialchars($installComment))."','".portsUsed($template)."');");
}
}
$actionsContext[] = array("icon"=>"ca_fa-edit","text"=>tr("Edit"),"action"=>"popupInstallXML('".addslashes($info[$ind]['template'])."','edit');");
$actionsContext[] = array("divider"=>true);
@ -563,7 +565,7 @@ function getPopupDescriptionSkin($appNumber) {
$template['UpdateAvailable'] = true;
$actionsContext[] = array("icon"=>"ca_fa-update","text"=>tr("Update"),"action"=>"updateDocker('$name');");
}
if ( $caSettings['defaultReinstall'] == "true" && ! $template['Blacklist']) {
if ( $caSettings['defaultReinstall'] == "true" && ! $template['Blacklist'] && $template['ID'] !== false) {
if ( $template['BranchID'] )
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Install second instance"),"action"=>"displayTags('{$template['ID']}',true,'','".portsUsed($template)."');");
else