AC wouldn't see a plugin update even if one existed in /tmp/plugins before the feed knew about it

pull/11/head
Squidly271 2022-05-22 14:48:10 -04:00
parent b24362bc2e
commit 8c17bf7333
3 changed files with 20 additions and 9 deletions

View File

@ -2,7 +2,7 @@ ec6a7223b0a9d028724db44a1d81a67f ./Apps.page
4e55f7483b661af21a25b677179baffe ./CA_notices.page 4e55f7483b661af21a25b677179baffe ./CA_notices.page
42a1658a916a3a3eed2a9f2af80603c4 ./ca_settings.page 42a1658a916a3a3eed2a9f2af80603c4 ./ca_settings.page
e718d7825dbdc96a17a915079222b098 ./default.cfg e718d7825dbdc96a17a915079222b098 ./default.cfg
084221f469c97f34ed4e8576730ead78 ./include/exec.php 075e2f41f1ab506187a1deb5e5b89557 ./include/exec.php
443a7e01447411322b706390a18d2bd5 ./include/helpers.php 443a7e01447411322b706390a18d2bd5 ./include/helpers.php
fc87642746ba4f324537bc381b78e982 ./include/paths.php fc87642746ba4f324537bc381b78e982 ./include/paths.php
532fffdf939594c143e679da02bd841e ./javascript/libraries.js 532fffdf939594c143e679da02bd841e ./javascript/libraries.js

View File

@ -1155,10 +1155,16 @@ function previous_apps() {
$template['InstallPath'] = "/var/log/plugins/$filename"; $template['InstallPath'] = "/var/log/plugins/$filename";
$template['Uninstall'] = true; $template['Uninstall'] = true;
if ( $installed == "action" && $template['PluginURL'] ) { if ( $installed == "action" && $template['PluginURL'] && $template['Name'] !== "Community Applications") {
if ( ( strcmp(plugin("version","/var/log/plugins/$filename"),$template['pluginVersion']) < 0 || $template['UpdateAvailable']) && $template['Name'] !== "Community Applications") { $installedVersion = plugin("version","/var/log/plugins/$filename");
$template['actionCentre'] = true; if ( ( strcmp($installedVersion,$template['pluginVersion']) < 0 || $template['UpdateAvailable']) ) {
} $template['actionCentre'] = true;
$template['UpdateAvailable'] = true;
}
if ( is_file("/tmp/plugins/$filename") && strcmp($installedVersion,plugin("version","/tmp/plugins/$filename")) < 0 ) {
$template['actionCentre'] = true;
$template['UpdateAvailable'] = true;
}
} }
if ( $installed == "action" && !$template['Blacklist'] && !$template['Deprecated'] && !$template['actionCentre'] ) if ( $installed == "action" && !$template['Blacklist'] && !$template['Deprecated'] && !$template['actionCentre'] )
@ -2339,16 +2345,21 @@ function enableActionCentre() {
foreach ($file as $template) { foreach ($file as $template) {
if ( ! $template['Plugin'] ) continue; if ( ! $template['Plugin'] ) continue;
if ( $template['Name'] == "Community Applications" )
continue;
$filename = pathinfo($template['Repository'],PATHINFO_BASENAME); $filename = pathinfo($template['Repository'],PATHINFO_BASENAME);
if ( checkInstalledPlugin($template) ) { if ( checkInstalledPlugin($template) ) {
$template['InstallPath'] = "/var/log/plugins/$filename"; $template['InstallPath'] = "/var/log/plugins/$filename";
$template['Uninstall'] = true; $template['Uninstall'] = true;
$installedVersion = plugin("version","/var/log/plugins/$filename");
if ( $template['PluginURL'] ) { if ( ( strcmp($installedVersion,$template['pluginVersion']) < 0 || $template['UpdateAvailable']) ) {
if ( ( strcmp(plugin("version","/var/log/plugins/$filename"),$template['pluginVersion']) < 0 || $template['UpdateAvailable']) && $template['Name'] !== "Community Applications") { $template['actionCentre'] = true;
}
if ( ! $template['actionCentre'] && is_file("/tmp/plugins/$filename") ) {
if ( strcmp($installedVersion,plugin("version","/tmp/plugins/$filename")) < 0 )
$template['actionCentre'] = true; $template['actionCentre'] = true;
}
} }
if ( !$template['Blacklist'] && !$template['Deprecated'] && !$template['actionCentre'] ) if ( !$template['Blacklist'] && !$template['Deprecated'] && !$template['actionCentre'] )