Ability to get rid of a particular app from a particular repo instead of all templates referencing the repository

pull/2/head
Squidly271 2017-10-26 19:21:57 -04:00
parent 5b7c3b3a46
commit f6527f1fdd
2 changed files with 19 additions and 0 deletions

Binary file not shown.

View File

@ -50,6 +50,25 @@ switch ($_GET['arg1']) {
echo "<br>";
}
}
$templates = json_decode(file_get_contents($communityPaths['community-templates-info']),true);
foreach ($templates as $template) {
$count = 0;
foreach ($templates as $searchTemplates) {
if ( ($template['Repository'] == $searchTemplates['Repository']) ) {
if ( $searchTemplates['BranchName'] || $searchTemplates['Blacklist'] ) {
continue;
}
$count++;
}
}
if ($count > 1) {
$dupeRepos .= "Duplicated Template: {$template['RepoName']} - {$template['Repository']} - {$template['Name']}<br>";
}
}
if ( $dupeRepos ) {
echo "<br><b></tt>The following docker applications refer to the same docker repository, but may have subtle changes in the template to warrant this</b><br><br><tt>$dupeRepos";
}
break;
case 'Blacklist':
$moderation = @file_get_contents($communityPaths['blacklisted_txt']);