diff --git a/archive/community.applications-2022.05.07-x86_64-1.txz b/archive/community.applications-2022.05.07-x86_64-1.txz index ba4234ac..4a5bd738 100644 Binary files a/archive/community.applications-2022.05.07-x86_64-1.txz and b/archive/community.applications-2022.05.07-x86_64-1.txz differ diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/Apps.page b/source/community.applications/usr/local/emhttp/plugins/community.applications/Apps.page index bba1ba84..8c039adc 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/Apps.page +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/Apps.page @@ -158,6 +158,8 @@ data.searchFlag = false; data.searchActive = false; // Sets whether changepage re-sorts the displayed templates. data.previousAppsSection = ""; // The section the user is on within previous apps data.searchInProgress = false; +data.deprecated = false; // Only set by reinstalling a deprecated plugin + var dockerNotEnabled; var postCount = 0; var cookieWarning = false; @@ -1114,6 +1116,7 @@ function closeSidebar(cookie=false,visible=false) { } function installPlugin(pluginURL,update=false,comment="") { + alert(pluginURL); type = update ? "update" : "install"; title = update ? "" : ""; closeSidebar(true); @@ -1137,6 +1140,11 @@ function installPlugin(pluginURL,update=false,comment="") { } else { var postFunction = "OpenSidebarAndRefreshDisplay"; } + data.deprecated = false; // global var here to trigger a rescan of action centre + if ( pluginURL.includes("&deprecated") ) { + data.deprecated = true; + pluginURL.replace("&deprecated",""); + } openBox('/plugins/community.applications/scripts/pluginInstall.php&arg1='+type+'&arg2='+pluginURL,title,600,900,true,postFunction); } else { enableSearch(); @@ -1148,6 +1156,11 @@ function installPlugin(pluginURL,update=false,comment="") { } else { var postFunction = "OpenSidebarAndRefreshDisplay"; } + data.deprecated = false; // global var here to trigger a rescan of action centre + if ( pluginURL.includes("&deprecated") ) { + data.deprecated = true; + pluginURL.replace("&deprecated",""); + } openBox('/plugins/community.applications/scripts/pluginInstall.php&arg1='+type+'&arg2='+pluginURL,title,600,900,true,postFunction); } @@ -1167,6 +1180,11 @@ function OpenSidebarAndRefreshDisplay() { if ( $.trim(apppath) ) { showSidebarApp(apppath,appname); } + if ( data.deprecated ) { + data.deprecated = false; + setupActionCentre(); + } + } }); } diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/ca.md5 b/source/community.applications/usr/local/emhttp/plugins/community.applications/ca.md5 index 24ebbc51..2db3f4a7 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/ca.md5 +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/ca.md5 @@ -1,4 +1,4 @@ -27e83831482abd3f3a30551ff06ada98 ./Apps.page +7f92a472f8e7bc8fc51db9778abc9ed5 ./Apps.page 4e55f7483b661af21a25b677179baffe ./CA_notices.page 42a1658a916a3a3eed2a9f2af80603c4 ./ca_settings.page e718d7825dbdc96a17a915079222b098 ./default.cfg @@ -21,4 +21,4 @@ da3b4f9b73c5c3bf65be6c42d68b51f9 ./scripts/showStatistics.php 34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php ce8e45452d3b63b5943b6f39c817bbf9 ./skins/Narrow/css.php c4d6ce8de3baff1c9de2b7f348b2f340 ./skins/Narrow/skin.html -07b1886782ee6418f82e0724d6ba8f6f ./skins/Narrow/skin.php +484b42f519e72726c857a9c9d19954d1 ./skins/Narrow/skin.php diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/skin.php b/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/skin.php index bad0db17..31fb936a 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/skin.php +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/skin.php @@ -235,7 +235,8 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false) } if ( ! $template['RequiresFile'] || ($template['RequiresFile'] && is_file($template['RequiresFile'])) ) { $installComment = $template['RequiresFile'] ? "" : $installComment; - $actionsContext[] = array("icon"=>"ca_fa-install","text"=>$buttonTitle,"action"=>"installPlugin('{$template['PluginURL']}','','".str_replace([" ","\n"],[" ",""],htmlspecialchars($installComment))."');"); + $isDeprecated = $template['Deprecated'] ? "&deprecated" : ""; + $actionsContext[] = array("icon"=>"ca_fa-install","text"=>$buttonTitle,"action"=>"installPlugin('{$template['PluginURL']}$isDeprecated','','".str_replace([" ","\n"],[" ",""],htmlspecialchars($installComment))."');"); } if ( $template['InstallPath'] ) { if ( ! empty($actionsContext) ) @@ -662,7 +663,8 @@ function getPopupDescriptionSkin($appNumber) { if ( !$template['Deprecated'] || $caSettings['hideDeprecated'] !== "true" ) { if ( ($template['RequiresFile'] && is_file($template['RequiresFile']) ) || ! $template['RequiresFile'] ) { $buttonTitle = $template['InstallPath'] ? tr("Reinstall") : tr("Install"); - $actionsContext[] = array("icon"=>"ca_fa-install","text"=>$buttonTitle,"action"=>"installPlugin('{$template['PluginURL']}');"); + $isDeprecated = $template['Deprecated'] ? "&deprecated" : ""; + $actionsContext[] = array("icon"=>"ca_fa-install","text"=>$buttonTitle,"action"=>"installPlugin('{$template['PluginURL']}$isDeprecated');"); } } }