mirror of
https://github.com/Squidly271/community.applications.git
synced 2025-06-03 14:52:13 +08:00
Fixed: Headers already sent warning when updating container thru CA
This commit is contained in:
parent
6df9a5e193
commit
f11dd375f2
Binary file not shown.
@ -12,7 +12,7 @@ ff03c8ebd7f4acd3a664933cf6a1c20a ./include/paths.php
|
||||
07684bde8ccd13523f62c69bb492fc27 ./scripts/installMulti.php
|
||||
be74e770cdc8938200fc29580be4e3a1 ./scripts/installMultiPlugin.php
|
||||
524afab04ca930f59117a846f819fb2f ./scripts/installPluginUpdate.sh
|
||||
5319e550a7b7a1c216eda8c7f2f0f4ef ./scripts/installUpdate.php
|
||||
afa5771f344d0600a7b3bbc40bd32d29 ./scripts/installUpdate.php
|
||||
5846421e95b475e1156c3f68164ccc4f ./scripts/languageInstall.sh
|
||||
d4770cba925e913500e0085b79267d3e ./scripts/notices.php
|
||||
a1401a0bed89c182b69f0c7508282c1f ./scripts/pluginInstall.php
|
||||
@ -21,4 +21,4 @@ da3b4f9b73c5c3bf65be6c42d68b51f9 ./scripts/showStatistics.php
|
||||
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
|
||||
0254b0a66007c3f6e32e7d259e8ee443 ./skins/Narrow/css.php
|
||||
0bdefa4e915c02ed3310c39eb5a1cef5 ./skins/Narrow/skin.html
|
||||
c23b1771106700f37171894f29975ccb ./skins/Narrow/skin.php
|
||||
acd6d0c6e62684521709c1f8daa43f5a ./skins/Narrow/skin.php
|
||||
|
@ -10,6 +10,11 @@
|
||||
.logLine{color:black !important;}
|
||||
</style>
|
||||
<?
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: "/usr/local/emhttp";
|
||||
|
||||
$_SERVER['REQUEST_URI'] = "docker/apps";
|
||||
@require_once "$docroot/plugins/dynamix/include/Translations.php";
|
||||
|
||||
require_once "/usr/local/emhttp/plugins/dynamix/include/Helpers.php";
|
||||
|
||||
$_GET['updateContainer'] = "true";
|
||||
|
@ -142,6 +142,8 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
|
||||
if ( $dockerUpdateStatus[$tmpRepo]['status'] == "false" ) {
|
||||
$template['UpdateAvailable'] = true;
|
||||
$actionsContext[] = array("icon"=>"ca_fa-update","text"=>tr("Update"),"action"=>"updateDocker('$name');");
|
||||
} else {
|
||||
$template['UpdateAvailable'] = false;
|
||||
}
|
||||
if ( $caSettings['defaultReinstall'] == "true" && ! $template['Blacklist']) {
|
||||
if ( $template['ID'] !== false ) { # don't allow 2nd if there's not a "default" within CA
|
||||
@ -166,7 +168,7 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
|
||||
$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']}');");
|
||||
$actionsContext[] = array("icon"=>"ca_fa-delete","text"=>tr("Remove from Previous Apps"),"alternate"=>tr("Remove"),"action"=>"removeApp('{$template['InstallPath']}','{$template['Name']}');");
|
||||
} else {
|
||||
if ( ! $template['BranchID'] ) {
|
||||
if ( is_file("{$caPaths['dockerManTemplates']}/my-{$template['Name']}.xml") ) {
|
||||
@ -191,6 +193,8 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
|
||||
@copy($caPaths['pluginTempDownload'],"/tmp/plugins/$pluginName");
|
||||
$template['UpdateAvailable'] = true;
|
||||
$actionsContext[] = array("icon"=>"ca_fa-update","text"=>tr("Update"),"action"=>"installPlugin('$pluginName',true);");
|
||||
} else {
|
||||
$template['UpdateAvailable'] = false;
|
||||
}
|
||||
$pluginSettings = ($pluginName == "community.applications.plg") ? "ca_settings" : plugin("launch","/var/log/plugins/$pluginName");
|
||||
if ( $pluginSettings ) {
|
||||
@ -1073,8 +1077,10 @@ function displayCard($template) {
|
||||
";
|
||||
|
||||
if ( $actionsContext ) {
|
||||
if ( count($actionsContext) == 1)
|
||||
$card .= "<div class='actionsButton' onclick={$actionsContext[0]['action']}>{$actionsContext[0]['text']}</div>";
|
||||
if ( count($actionsContext) == 1) {
|
||||
$dispText = $actionsContext[0]['alternate'] ?: $actionsContext[0]['text'];
|
||||
$card .= "<div class='actionsButton' onclick={$actionsContext[0]['action']}>$dispText</div>";
|
||||
}
|
||||
else
|
||||
$card .= "<div class='actionsButton actionsButtonContext' id='actions".preg_replace("/[^a-zA-Z0-9]+/", "",$Name)."$ID' data-context='".json_encode($actionsContext,JSON_HEX_QUOT | JSON_HEX_APOS)."'>".tr("Actions")."</div>";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user