[TikiWiki-commits] [Git][tikiwiki/tiki][27.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 | <694ffee0dd110_2a17fee453c6@gitlab-sidekiq-low-urgency-cpu-bound-v2-587dc6b794-slw84.mail> |
Camile pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki
Commits:
b6efa37d by Camile at 2025-12-27T15:38:13+00:00
[FIX] Handle missing galleryId when logging external file downloads
---
* [FIX] Handle missing galleryId when logging external file downloads
See merge request tikiwiki/tiki!9280
- - - - -
1 changed file:
- tiki-download_file.php
Changes:
=====================================
tiki-download_file.php
=====================================
@@ -171,7 +171,22 @@ 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/b6efa37d79590d968f4db4a478eca01f1a56f6b9
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/b6efa37d79590d968f4db4a478eca01f1a56f6b9
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