This commit is contained in:
Squidly271 2023-03-03 13:05:59 -05:00
parent 6ff5d881c7
commit 1a71544ce8
7 changed files with 32 additions and 26 deletions

Binary file not shown.

View File

@ -2,8 +2,8 @@
<!DOCTYPE PLUGIN [ <!DOCTYPE PLUGIN [
<!ENTITY name "community.applications"> <!ENTITY name "community.applications">
<!ENTITY author "Andrew Zawadzki"> <!ENTITY author "Andrew Zawadzki">
<!ENTITY version "2023.02.25"> <!ENTITY version "2023.03.03">
<!ENTITY md5 "3b70570c4c6e7b19c05e2e15d5a6c1f9"> <!ENTITY md5 "def37490eea07a768c282963303ec4f8">
<!ENTITY launch "Apps"> <!ENTITY launch "Apps">
<!ENTITY plugdir "/usr/local/emhttp/plugins/&name;"> <!ENTITY plugdir "/usr/local/emhttp/plugins/&name;">
<!ENTITY github "Squidly271/community.applications"> <!ENTITY github "Squidly271/community.applications">
@ -13,6 +13,9 @@
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" min="6.9.0" support="https://unraid.net/forums/topic/38582-plug-in-community-applications" icon="users"> <PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" min="6.9.0" support="https://unraid.net/forums/topic/38582-plug-in-community-applications" icon="users">
<CHANGES> <CHANGES>
###2023.03.03
- PHP8 Upgrades
###2023.02.25 ###2023.02.25
- PHP8 Upgrades - PHP8 Upgrades

View File

@ -2,8 +2,8 @@
106b521c1feebda4d7b3f558cc016cda ./CA_notices.page 106b521c1feebda4d7b3f558cc016cda ./CA_notices.page
eb1f0ee4148747c0473e73e4e973994f ./ca_settings.page eb1f0ee4148747c0473e73e4e973994f ./ca_settings.page
e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg
2afc8f78a574f96fd8e363fdc79b01cc ./include/exec.php 6f37a8e88b8b7ff82c8be2cc8d686005 ./include/exec.php
30945223728e4349d4dd8054cda0a0e1 ./include/helpers.php 41fd8377dadc9dad5abb4c5fc3fe71ea ./include/helpers.php
8e053d6cd83fbe2202c13b692beabb4f ./include/paths.php 8e053d6cd83fbe2202c13b692beabb4f ./include/paths.php
532fffdf939594c143e679da02bd841e ./javascript/libraries.js 532fffdf939594c143e679da02bd841e ./javascript/libraries.js
71f911a818d88d3d567f8a2898094ee2 ./README.md 71f911a818d88d3d567f8a2898094ee2 ./README.md
@ -17,9 +17,9 @@ fbd7122dbf5312c30d164312aa6c13e4 ./scripts/installMultiPlugin.php
5846421e95b475e1156c3f68164ccc4f ./scripts/languageInstall.sh 5846421e95b475e1156c3f68164ccc4f ./scripts/languageInstall.sh
053585561f8764e01787459f4bcf3a2a ./scripts/notices.php 053585561f8764e01787459f4bcf3a2a ./scripts/notices.php
ed42a35b3524b55e2024cdd56a795733 ./scripts/pluginInstall.php ed42a35b3524b55e2024cdd56a795733 ./scripts/pluginInstall.php
3888e6583182d12a6e993488f0bbbae0 ./scripts/showStatistics.php f2a86fd875cb73bb095388e69ca035fd ./scripts/showStatistics.php
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh 4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh
5c088a7cf82229cb64edfd4c415a84a0 ./scripts/updatePluginSupport.php 5c088a7cf82229cb64edfd4c415a84a0 ./scripts/updatePluginSupport.php
230290ceb59b21a3fae7fa7674d5d89d ./skins/Narrow/css.php 230290ceb59b21a3fae7fa7674d5d89d ./skins/Narrow/css.php
d642a25efb891e51471fc4c7636da885 ./skins/Narrow/skin.html d642a25efb891e51471fc4c7636da885 ./skins/Narrow/skin.html
e0ee2a325ef43100b4c810bb61514df4 ./skins/Narrow/skin.php 8ae1b7aabc7e3bd17284dcee30eccc97 ./skins/Narrow/skin.php

View File

@ -847,7 +847,7 @@ function get_content() {
} else continue; } else continue;
} }
if ( $template['Deprecated'] && $displayDeprecated && ! $template['Blacklist']) { if ( $template['Deprecated'] && $displayDeprecated && ! $template['Blacklist']) {
if ( ! $template['BranchID'] ) if ( ! ($template['BranchID']??false) )
$display[] = $template; $display[] = $template;
continue; continue;
} }
@ -1468,29 +1468,30 @@ function statistics() {
$templates = &$GLOBALS['templates']; $templates = &$GLOBALS['templates'];
pluginDupe(); pluginDupe();
$invalidXML = readJsonFile($caPaths['invalidXML_txt']); $invalidXML = readJsonFile($caPaths['invalidXML_txt']);
$statistics['private'] = 0; $statistics['blacklist'] = $statistics['plugin'] = $statistics['docker'] = $statistics['private'] = $statistics['totalDeprecated'] = $statistics['totalIncompatible'] = $statistics['official'] = $statistics['invalidXML'] = 0;
foreach ($templates as $template) { foreach ($templates as $template) {
if ( $template['Deprecated'] && ! $template['Blacklist'] && ! $template['BranchID']) $statistics['totalDeprecated']++; if ( ($template['Deprecated']??false) && ! ($template['Blacklist']??false) && ! ($template['BranchID']??false)) $statistics['totalDeprecated']++;
if ( ! $template['Compatible'] ) $statistics['totalIncompatible']++; if ( ! ($template['Compatible']??false) ) $statistics['totalIncompatible']++;
if ( $template['Blacklist'] ) $statistics['blacklist']++; if ( $template['Blacklist']??false ) $statistics['blacklist']++;
if ( $template['Private'] && ! $template['Blacklist']) { if ( ($template['Private']??false) && ! ($template['Blacklist']??false)) {
if ( ! ($caSettings['hideDeprecated'] == 'true' && $template['Deprecated']) ) if ( ! ($caSettings['hideDeprecated'] == 'true' && ($template['Deprecated']??false)) )
$statistics['private']++; $statistics['private']++;
} }
if ( $template['Official'] && ! $template['Blacklist'] ) if ( ($template['Official']??false) && ! ($template['Blacklist']??false) )
$statistics['official']++; $statistics['official']++;
if ( ! $template['PluginURL'] && ! $template['Repository'] ) if ( ! ($template['PluginURL']??false) && ! ($template['Repository']??false) )
$statistics['invalidXML']++; $statistics['invalidXML']++;
else { else {
if ( $template['PluginURL'] ) if ( $template['PluginURL'] ?? false)
$statistics['plugin']++; $statistics['plugin']++;
else { else {
if ( $template['BranchID'] ) { if ( $template['BranchID'] ?? false) {
continue; continue;
} else { } else {
$statistics['docker']++; $statistics['docker']++;
@ -1851,7 +1852,7 @@ function createXML() {
if ( $template['Config'] ) { if ( $template['Config'] ) {
$testarray = $template['Config'] ?: []; $testarray = $template['Config'] ?: [];
if (!$testarray[0]) $testarray = [$testarray]; if (!($testarray[0]??false)) $testarray = [$testarray];
foreach ($testarray as &$config) { foreach ($testarray as &$config) {
if ( is_array($config['@attributes']) ) { if ( is_array($config['@attributes']) ) {

View File

@ -244,7 +244,7 @@ function fixTemplates($template) {
} else { } else {
if (is_array($template['Config'])) { if (is_array($template['Config'])) {
foreach ($template['Config'] as &$config) { foreach ($template['Config'] as &$config) {
if (preg_match("/^(Container Path:|Container Port:|Container Label:|Container Variable:|Container Device:)/",$config['@attributes']['Description']) ) { if (preg_match("/^(Container Path:|Container Port:|Container Label:|Container Variable:|Container Device:)/",$config['@attributes']['Description']??"") ) {
$config['@attributes']['Description'] = ""; $config['@attributes']['Description'] = "";
} }
} }
@ -623,10 +623,9 @@ function languageCheck($template) {
return false; return false;
$OSupdates = readXmlFile($dynamixUpdate,true); // Because the OS might check for an update before the feed $OSupdates = readXmlFile($dynamixUpdate,true); // Because the OS might check for an update before the feed
if ( ! $OSupdates ) { if ( ! $OSupdates )
$OSupdates = [];
$OSupdates['Version'] = "1900.01.01"; $OSupdates['Version'] = "1900.01.01";
}
$xmlFile = readXmlFile($installedLanguage,true); $xmlFile = readXmlFile($installedLanguage,true);
if ( !$xmlFile['Version'] ) return false; if ( !$xmlFile['Version'] ) return false;

View File

@ -16,9 +16,10 @@ require_once "$docroot/plugins/dynamix/include/Helpers.php";
$_SERVER['REQUEST_URI'] = "docker/apps"; $_SERVER['REQUEST_URI'] = "docker/apps";
require_once "$docroot/plugins/dynamix/include/Translations.php"; require_once "$docroot/plugins/dynamix/include/Translations.php";
require_once "$docroot/plugins/community.applications/include/helpers.php"; require_once "$docroot/plugins/community.applications/include/helpers.php";
$caSettings = parse_plugin_cfg("community.applications");
function tr($string,$ret=true) { function tr($string,$ret=true) {
$string = str_replace('"',"&#34;",str_replace("'","&#39;",_($string))); $string = str_replace('"',"&#34;",str_replace("'","&#39;",_($string)));
if ( $ret ) if ( $ret )
@ -98,7 +99,7 @@ switch ($_GET['arg1']) {
foreach (array_keys($dupeList) as $dupe) { foreach (array_keys($dupeList) as $dupe) {
echo "<span class='ca_bold'>$dupe</span><br>"; echo "<span class='ca_bold'>$dupe</span><br>";
foreach ($templates as $template) { foreach ($templates as $template) {
if ( basename($template['PluginURL']) == $dupe ) { if ( basename($template['PluginURL']??"") == $dupe ) {
echo "<tt>{$template['Author']} - {$template['Name']}<br></tt>"; echo "<tt>{$template['Author']} - {$template['Name']}<br></tt>";
} }
} }
@ -106,6 +107,7 @@ switch ($_GET['arg1']) {
} }
} }
$templates = readJsonFile($caPaths['community-templates-info']); $templates = readJsonFile($caPaths['community-templates-info']);
$dupeRepos = "";
foreach ($templates as $template) { foreach ($templates as $template) {
$template['Repository'] = str_replace(":latest","",$template['Repository']); $template['Repository'] = str_replace(":latest","",$template['Repository']);
$count = 0; $count = 0;
@ -130,8 +132,9 @@ switch ($_GET['arg1']) {
case 'Moderation': case 'Moderation':
echo "<br><div class='ca_center'><strong>".tr("If any of these entries are incorrect then contact the moderators of CA to discuss")."</strong></div><br><br>"; echo "<br><div class='ca_center'><strong>".tr("If any of these entries are incorrect then contact the moderators of CA to discuss")."</strong></div><br><br>";
$moderation = file_get_contents($caPaths['moderation']); $moderation = file_get_contents($caPaths['moderation']);
$repoComment = "";
foreach ($repositories as $repo) { foreach ($repositories as $repo) {
if ($repo['RepoComment']) { if ($repo['RepoComment']??false) {
$repoComment .= "<tr><td>{$repo['name']}</td><td>{$repo['RepoComment']}</td></tr>"; $repoComment .= "<tr><td>{$repo['name']}</td><td>{$repo['RepoComment']}</td></tr>";
} }
} }

View File

@ -783,7 +783,7 @@ function getPopupDescriptionSkin($appNumber) {
if ( $template['Registry'] ) if ( $template['Registry'] )
$supportContext[] = ["icon"=>"ca_fa-docker","link"=>$template['Registry'],"text"=> tr("Registry")]; $supportContext[] = ["icon"=>"ca_fa-docker","link"=>$template['Registry'],"text"=> tr("Registry")];
if ( $caSettings['dev'] == "yes" ) if ( $caSettings['dev'] == "yes" )
$supportContext[] = ["icon"=>"ca_fa-template","link"=> $template['caTemplateURL'] ?: $template['TemplateURL'],"text"=>tr("Application Template")]; $supportContext[] = ["icon"=>"ca_fa-template","link"=> $template['caTemplateURL'] ?: ($template['TemplateURL']??""),"text"=>tr("Application Template")];
$author = $template['PluginURL'] ? $template['PluginAuthor'] : $template['SortAuthor']; $author = $template['PluginURL'] ? $template['PluginAuthor'] : $template['SortAuthor'];