This commit is contained in:
Squidly271 2022-04-21 09:15:30 -04:00
parent d486c60211
commit 728f0b3dd9
3 changed files with 8 additions and 7 deletions

Binary file not shown.

View File

@ -21,4 +21,4 @@ da3b4f9b73c5c3bf65be6c42d68b51f9 ./scripts/showStatistics.php
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
c7ba8f5e37c5943bdc2c8c90fd580276 ./skins/Narrow/css.php
0bdefa4e915c02ed3310c39eb5a1cef5 ./skins/Narrow/skin.html
d1dce59e345650c318386589b6de04b3 ./skins/Narrow/skin.php
444485f96e18f42d42612efd4ba5066e ./skins/Narrow/skin.php

View File

@ -195,12 +195,13 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
} else {
$pluginName = basename($template['PluginURL']);
if ( file_exists("/var/log/plugins/$pluginName") ) {
if ( (strcmp(plugin("version","/var/log/plugins/$pluginName"),$template['pluginVersion']) < 0) && $template['Name'] !== "Community Applications" ) {
if ( ( strcmp(plugin("version","/var/log/plugins/$pluginName"),$template['pluginVersion']) < 0 || $template['UpdateAvailable']) && $template['Name'] !== "Community Applications") {
@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;
if ( ! $template['UpdateAvailable'] ) # this handles if the feed hasn't caught up to the update yet
$template['UpdateAvailable'] = false;
}
$pluginSettings = ($pluginName == "community.applications.plg") ? "ca_settings" : plugin("launch","/var/log/plugins/$pluginName");
if ( $pluginSettings ) {
@ -1219,15 +1220,15 @@ function displayCard($template) {
<div class='betaPopupText ca_center' title='".tr("This application template has been deprecated")."'>".tr("Deprecated")."$flagTextEnd</div>
</div>
";
} elseif ( $UpdateAvailable ) {
} elseif ( $UpdateAvailable ) {
$card .= "
<div class='betaCardBackground'>
<div class='installedCardText ca_center'>".tr("UPDATED")."</div>
</div>";
} elseif ( $Installed || $Uninstall) {
$card .= "
<div class='installedCardBackground'>
<div class='installedCardText ca_center'>".tr("INSTALLED")."</div>
$card .= "
<div class='installedCardBackground'>
<div class='installedCardText ca_center'>".tr("INSTALLED")."</div>
</div>";
} elseif ( $Official ) {
$card .= "