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

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

Camile pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
a802445f by Camile at 2025-12-23T02:39:19+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!8129

- - - - -


2 changed files:

- + components.d.ts
- tiki-download_file.php


Changes:

=====================================
components.d.ts
=====================================
@@ -0,0 +1,26 @@
+/* eslint-disable */
+// @ts-nocheck
+// Generated by unplugin-vue-components
+// Read more: https://github.com/vuejs/core/pull/3399
+// biome-ignore lint: disable
+export {}
+
+/* prettier-ignore */
+declare module 'vue' {
+  export interface GlobalComponents {
+    ElAlert: typeof import('element-plus/es')['ElAlert']
+    ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
+    ElBacktop: typeof import('element-plus/es')['ElBacktop']
+    ElButton: typeof import('element-plus/es')['ElButton']
+    ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
+    ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
+    ElIcon: typeof import('element-plus/es')['ElIcon']
+    ElInput: typeof import('element-plus/es')['ElInput']
+    ElOption: typeof import('element-plus/es')['ElOption']
+    ElOptionGroup: typeof import('element-plus/es')['ElOptionGroup']
+    ElSelect: typeof import('element-plus/es')['ElSelect']
+    ElSlider: typeof import('element-plus/es')['ElSlider']
+    ElTransfer: typeof import('element-plus/es')['ElTransfer']
+    ElUpload: typeof import('element-plus/es')['ElUpload']
+  }
+}


=====================================
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/a802445f789fb359a965156d2f0724b2be895038

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