[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX] Handle missing galleryId when logging external file downloads

"Camile \(@camilevahviraki\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <694a0e9dae544_2a17fc3c664f8@gitlab-sidekiq-low-urgency-cpu-bound-v2-6d8dd5f4c9-qbjmq.mail>

Camile pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
88a67fcd by Camile at 2025-12-23T03:30:27+00:00
[FIX] Handle missing galleryId when logging external file downloads
---
* [FIX] Handle missing galleryId when logging external file downloads
---
* [FIX] Handle missing galleryId when logging external file downloads

See merge request tikiwiki/tiki!8129

See merge request tikiwiki/tiki!9262

- - - - -


1 changed file:

- tiki-download_file.php


Changes:

=====================================
tiki-download_file.php
=====================================
@@ -174,7 +174,21 @@ if (! isset($_GET['thumbnail']) && ! isset($_GET['icon'])) {
 
     if ($prefs['feature_actionlog'] == 'y') {
         $logslib = TikiLib::lib('logs');
-        $logslib->add_action('Downloaded', $info['galleryId'], 'file gallery', 'fileId=' . $info['fileId']);
+        if (! empty($info['galleryId']) && ! empty($info['fileId'])) {
+            $logslib->add_action(
+                'Downloaded',
+                $info['galleryId'],
+                'file gallery',
+                'fileId=' . $info['fileId']
+            );
+        } else {
+            $logslib->add_action(
+                'Downloaded',
+                'external',
+                'file gallery',
+                'source_url=' . $src
+            );
+        }
     }
 
     if (! empty($_REQUEST['lock']) && $access->checkCsrf(true)) {



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/88a67fcda34012c9172c1e3daf9c2eaa7f098298

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/88a67fcda34012c9172c1e3daf9c2eaa7f098298
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.