From 5081acda91a24a8f49f20da23cdea5fdc64389df Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 16 Dec 2024 16:47:09 +0100 Subject: [PATCH] fixes #2295 send_piwigo_infos, add core updates --- include/functions.inc.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/functions.inc.php b/include/functions.inc.php index 2ac5eff4d..1de82c75f 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -2761,6 +2761,32 @@ SELECT @$piwigo_infos['activities'][ $activity['object'] ][ $label_for_system_object_id[ $activity['object_id'] ] ?? 'undefined' ][ $activity['action'] ] = $activity['counter']; } + $query = ' +SELECT + action, + occured_on, + details + FROM '.ACTIVITY_TABLE.' + WHERE object = \'system\' + AND object_id = '.ACTIVITY_SYSTEM_CORE.' + AND action IN (\'update\', \'autoupdate\') + ORDER BY activity_id ASC +;'; + $updates = query2array($query); + foreach ($updates as $update) + { + $details = safe_unserialize($update['details']); + if (isset($details['from_version']) and isset($details['to_version'])) + { + @$piwigo_infos['updates'][] = array( + 'action' => $update['action'], + 'occured_on' => $update['occured_on'], + 'from_version' => $details['from_version'], + 'to_version' => $details['to_version'], + ); + } + } + $watermark = ImageStdParams::get_watermark(); $piwigo_infos['features'] = array(