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

"Camile \(@camilevahviraki\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <694feaf788d1_2a233c410605c7@gitlab-sidekiq-low-urgency-cpu-bound-v2-587dc6b794-2tvj6.mail>

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


Commits:
27761342 by Camile at 2025-12-27T14:12:58+00:00
[BP][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
---
* [FIX] Handle missing galleryId when logging external file downloads

See merge request tikiwiki/tiki!8129

See merge request tikiwiki/tiki!9262

See merge request tikiwiki/tiki!9279

- - - - -


1 changed file:

- tiki-download_file.php


Changes:

=====================================
tiki-download_file.php
=====================================
@@ -171,7 +171,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/27761342be44c25e67c7959469729a9de47db6d8

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/27761342be44c25e67c7959469729a9de47db6d8
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.