[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results

"Jean-Marc Kadimba \(@jmkadimba\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69849cfb6dc9d_3b18ec8c50183@gitlab-sidekiq-low-urgency-cpu-bound-v2-7df966bb7-xwvb2.mail>

Jean-Marc Kadimba pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
29857c4d by Jean-Marc Kadimba at 2026-02-05T15:36:56+02:00
[FIX] Wikiplugin CustomSearch: Fix an issue with the download search results
---
* [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results

* [FIX] fix phpcs

* [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results

* [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results

See merge request tikiwiki/tiki!9441


(cherry picked from commit 62a9f037ee9baa5b99fecc59749998e50ebf6332)

bdd30e80 [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results
97e1337f [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results
f3b9dc6a [FIX] fix phpcs
996b58f7 [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results

Co-authored-by: Jean-Marc Kadimba <[email protected]>
- - - - -


1 changed file:

- lib/wiki-plugins/wikiplugin_customsearch.php


Changes:

=====================================
lib/wiki-plugins/wikiplugin_customsearch.php
=====================================
@@ -572,6 +572,22 @@ customsearch$id._load = function (receive, params) {
     if (typeof params !== undefined) {
         $.extend(datamap, params);
     }
+    if (datamap.download) {
+        let form = $('<form method=\"post\" action=\"'+$.service('search_customsearch', 'customsearch')+'\"></form>');
+        $.param(datamap).split('&').forEach(function(pair) {
+            let parts = pair.split('=');
+            let name = decodeURIComponent(parts[0]);
+            let value = decodeURIComponent(parts[1] || '');
+            form.append($('<input>').attr({
+                type: 'hidden',
+                name: name,
+                value: value
+            }));
+        });
+        form.appendTo('body').submit();
+        return;
+    }
+
     $.ajax({
         type: 'POST',
         url: $.service('search_customsearch', 'customsearch'),
@@ -600,6 +616,11 @@ customsearch$id.maxRecords = $maxRecords;
 customsearch$id.store_query ='';
 customsearch$id.init();
 $iconinsert;
+$(document).on('submit', '#listexecute-download-wpcs-$id, #listexecute-download-top-wpcs-$id', function(e) {
+    e.preventDefault();
+    customsearch$id._load(null, {download: true});
+    return false;
+});
 $(document).trigger('formSearchReady');
 ";
 



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/29857c4d950d4f3e24d0d2885c31f57a6286a675

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