Flags apps which are blacklisted even if no longer available in feed
parent
f1df1daaf2
commit
6df9a5e193
Binary file not shown.
|
@ -2,9 +2,9 @@
|
|||
4e55f7483b661af21a25b677179baffe ./CA_notices.page
|
||||
42a1658a916a3a3eed2a9f2af80603c4 ./ca_settings.page
|
||||
e718d7825dbdc96a17a915079222b098 ./default.cfg
|
||||
8e1b0220b451464f41916c2b7b5a2ae8 ./include/exec.php
|
||||
774f6111b7adb6c4c5825a17fec7d57c ./include/exec.php
|
||||
d5ba81dbd93c7b149dec96def31107e9 ./include/helpers.php
|
||||
d9b0dc98ee598d44633341ac199a43e0 ./include/paths.php
|
||||
ff03c8ebd7f4acd3a664933cf6a1c20a ./include/paths.php
|
||||
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
|
||||
71f911a818d88d3d567f8a2898094ee2 ./README.md
|
||||
79f3093f42415484944e6aa2863ee30a ./scripts/checkForUpdates.php
|
||||
|
@ -21,4 +21,4 @@ da3b4f9b73c5c3bf65be6c42d68b51f9 ./scripts/showStatistics.php
|
|||
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
|
||||
0254b0a66007c3f6e32e7d259e8ee443 ./skins/Narrow/css.php
|
||||
0bdefa4e915c02ed3310c39eb5a1cef5 ./skins/Narrow/skin.html
|
||||
6df7b43e58a2bfedc4ee7325859353f8 ./skins/Narrow/skin.php
|
||||
c23b1771106700f37171894f29975ccb ./skins/Narrow/skin.php
|
||||
|
|
|
@ -377,6 +377,7 @@ function DownloadApplicationFeed() {
|
|||
}
|
||||
|
||||
writeJsonFile($caPaths['repositoryList'],$ApplicationFeed['repositories']);
|
||||
writeJsonFile($caPaths['extraBlacklist'],$ApplicationFeed['blacklisted']);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ $caPaths['application-feed-last-updatedBackup'] = "https://s3.amazonaws.com/dnld
|
|||
$caPaths['appFeedDownloadError'] = $caPaths['tempFiles']."/downloaderror.txt";
|
||||
$caPaths['categoryList'] = $caPaths['tempFiles']."/categoryList.json";
|
||||
$caPaths['repositoryList'] = $caPaths['tempFiles']."/repositoryList.json";
|
||||
$caPaths['extraBlacklist'] = $caPaths['tempFiles']."/extraBlacklist.json";
|
||||
$caPaths['sortOrder'] = $caPaths['tempFiles']."/sortOrder.json";
|
||||
$caPaths['currentServer'] = $caPaths['tempFiles']."/currentServer.txt";
|
||||
$caPaths['lastUpdated'] = $caPaths['tempFiles']."/lastUpdated.json";
|
||||
|
|
|
@ -31,6 +31,7 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
|
|||
|
||||
$dockerUpdateStatus = readJsonFile($caPaths['dockerUpdateStatus']);
|
||||
$repositories = readJsonFile($caPaths['repositoryList']);
|
||||
$extraBlacklist = readJsonFile($caPaths['extraBlacklist']);
|
||||
|
||||
if ( is_file("/var/run/dockerd.pid") && is_dir("/proc/".@file_get_contents("/var/run/dockerd.pid")) ) {
|
||||
$caSettings['dockerRunning'] = "true";
|
||||
|
@ -73,7 +74,7 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
|
|||
foreach ($file as $template) {
|
||||
/* if ( $template['Blacklist'] && ! $template['NoInstall'] )
|
||||
continue; */
|
||||
|
||||
|
||||
$startingAppCounter++;
|
||||
if ( $startingAppCounter < $startingApp ) continue;
|
||||
$displayedTemplates[] = $template;
|
||||
|
@ -83,6 +84,12 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
|
|||
|
||||
# Create entries for skins.
|
||||
foreach ($displayedTemplates as $template) {
|
||||
if ( ! $template['Blacklist'] ) {
|
||||
if ( $extraBlacklist[$template['Repository']] ) {
|
||||
$template['Blacklist'] = true;
|
||||
$template['ModeratorComment'] = $extraBlacklist[$template['Repository']];
|
||||
}
|
||||
}
|
||||
if ( $template['RepositoryTemplate'] ) {
|
||||
$template['Icon'] = $template['icon'] ?: "/plugins/dynamix.docker.manager/images/question.png";
|
||||
|
||||
|
@ -137,7 +144,7 @@ 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['ID'] !== false ) {
|
||||
if ( $template['ID'] !== false ) { # don't allow 2nd if there's not a "default" within CA
|
||||
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
|
||||
|
@ -155,8 +162,10 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
|
|||
} elseif ( ! $template['Blacklist'] || ! $template['Compatible']) {
|
||||
if ( $template['InstallPath'] ) {
|
||||
$userTemplate = readXmlFile($template['InstallPath'],false,false);
|
||||
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Reinstall"),"action"=>"popupInstallXML('".addslashes($template['InstallPath'])."','user','','".portsUsed($userTemplate)."');");
|
||||
$actionsContext[] = array("divider"=>true);
|
||||
if ( ! $template['Blacklist'] ) {
|
||||
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Reinstall"),"action"=>"popupInstallXML('".addslashes($template['InstallPath'])."','user','','".portsUsed($userTemplate)."');");
|
||||
$actionsContext[] = array("divider"=>true);
|
||||
}
|
||||
$actionsContext[] = array("icon"=>"ca_fa-delete","text"=>tr("Remove from Previous Apps"),"action"=>"removeApp('{$template['InstallPath']}','{$template['Name']}');");
|
||||
} else {
|
||||
if ( ! $template['BranchID'] ) {
|
||||
|
@ -392,6 +401,8 @@ function getPopupDescriptionSkin($appNumber) {
|
|||
$tabMode = '_parent';
|
||||
|
||||
$allRepositories = readJsonFile($caPaths['repositoryList']);
|
||||
$extraBlacklist = readJsonFile($caPaths['extraBlacklist']);
|
||||
|
||||
$pinnedApps = readJsonFile($caPaths['pinnedV2']);
|
||||
if ( ! is_file($caPaths['statistics']) )
|
||||
download_json($caPaths['statisticsURL'],$caPaths['statistics']);
|
||||
|
@ -455,6 +466,13 @@ function getPopupDescriptionSkin($appNumber) {
|
|||
/* if ( $currentServer == "Primary Server" && $template['IconHTTPS'])
|
||||
$template['Icon'] = $template['IconHTTPS'];
|
||||
*/
|
||||
|
||||
if ( ! $template['Blacklist'] ) {
|
||||
if ( $extraBlacklist[$template['Repository']] ) {
|
||||
$template['Blacklist'] = true;
|
||||
$template['ModeratorComment'] = $extraBlacklist[$template['Repository']];
|
||||
}
|
||||
}
|
||||
$ID = $template['ID'];
|
||||
|
||||
$template['Profile'] = $allRepositories[$template['RepoName']]['profile'];
|
||||
|
@ -1074,7 +1092,7 @@ function displayCard($template) {
|
|||
$card .= "<span class='pinnedCard' title='".htmlentities(tr("This application is pinned for later viewing"))."' data-pindata='$pindata$SortName' style='$pinStyle'></span>";
|
||||
|
||||
|
||||
if ($Removable && !$DockerInfo && ! $Installed) {
|
||||
if ($Removable && !$DockerInfo && ! $Installed && ! $Blacklist) {
|
||||
$previousAppName = $Plugin ? $PluginURL : $Name;
|
||||
$type = ($appType == "appDocker") ? "docker" : "plugin";
|
||||
$card .= "<input class='ca_multiselect ca_tooltip' title='".tr("Check off to select multiple reinstalls")."' type='checkbox' data-name='$previousAppName' data-humanName='$Name' data-type='$type' data-deletepath='$InstallPath' $checked>";
|
||||
|
|
Loading…
Reference in New Issue