Fix update button would appear on card's action even if plugin was up to date if the update was released within 2 hours ago

pull/11/head
Squidly271 2022-03-10 14:01:03 -05:00
parent 021278d407
commit c83114cdd8
3 changed files with 2 additions and 2 deletions

View File

@ -20,4 +20,4 @@ da3b4f9b73c5c3bf65be6c42d68b51f9 ./scripts/showStatistics.php
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
62494acd8ae889cf55688a22852eadb0 ./skins/Narrow/css.php
639c5146c5880a617fe15f603b1cffa3 ./skins/Narrow/skin.html
5e0bcf392899a3df7fa7eca49ca4d009 ./skins/Narrow/skin.php
d6a18ff09e97f697708853b7fc559eff ./skins/Narrow/skin.php

View File

@ -164,7 +164,7 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
} else {
$pluginName = basename($template['PluginURL']);
if ( file_exists("/var/log/plugins/$pluginName") ) {
if ( plugin("version","/var/log/plugins/$pluginName") != $template['pluginVersion'] && $template['Name'] !== "Community Applications" ) {
if ( (strcmp(plugin("version","/var/log/plugins/$pluginName"),$template['pluginVersion']) < 0) && $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);");