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

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6982f37fa7e0c_3b1842c8288c2@gitlab-sidekiq-low-urgency-cpu-bound-v2-65d8676567-h99fc.mail>

Victor Emanouilov pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
62a9f037 by Jean-Marc Kadimba at 2026-02-04T07:13:02+00: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

- - - - -


1 changed file:

- lib/wiki-plugins/wikiplugin_customsearch.php


Changes:

=====================================
lib/wiki-plugins/wikiplugin_customsearch.php
=====================================
@@ -557,6 +557,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'),
@@ -585,6 +601,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/62a9f037ee9baa5b99fecc59749998e50ebf6332

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