[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX] Cypht integration: fix move to tracker search and item suggestion, send...

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6911f61d58039_2c14394b8904bc@gitlab-sidekiq-low-urgency-cpu-bound-v2-fc49d4986-n85p6.mail>

Victor Emanouilov pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
9f5df675 by Victor Emanouilov at 2025-11-10T14:19:55+00:00
[FIX] Cypht integration: fix move to tracker search and item suggestion, send Tiki feedback via cypht ajax calls and handle it on the client side

- - - - -


5 changed files:

- lib/core/Services/Cypht/Controller.php
- lib/cypht/modules/tiki/functions.php
- lib/cypht/modules/tiki/js_modules/moveToTracker.js
- lib/cypht/modules/tiki/setup.php
- lib/cypht/modules/tiki/site.js


Changes:

=====================================
lib/core/Services/Cypht/Controller.php
=====================================
@@ -35,6 +35,8 @@ class Services_Cypht_Controller
             }
         }
 
+        Feedback::sendHeaders();
+
         // either html or already json encoded, so skip broker/accesslib output and do it here
         echo $dispatcher->session->dedup_page_links($dispatcher->output);
         exit;


=====================================
lib/cypht/modules/tiki/functions.php
=====================================
@@ -489,14 +489,7 @@ function find_relevant_tracker_items($keywords, $multivalueField = '', $searchAr
         }, $fields));
         $query->filterMultivalue($filterField, $keywords);
     } else {
-        if ($avoidSubQueries) {
-            $query->filterContent($keywords);
-        } else {
-            $subq = $query->getSubQuery('keywords');
-            foreach (explode(' ', $keywords) as $keyword) {
-                $subq->filterContent($keyword);
-            }
-        }
+        $query->filterContent($keywords);
     }
 
     $resultSet = $query->search($lib->getIndex());


=====================================
lib/cypht/modules/tiki/js_modules/moveToTracker.js
=====================================
@@ -16,7 +16,7 @@ function showMoveToTrackerModal(onSuccess) {
 
             Hm_Ajax.request([
                 {name: 'hm_ajax_hook', value: 'ajax_tiki_msg_tracker_items'},
-                {name: 'lookup', value: lookup},
+                {name: 'lookup', value: $('.js-header_subject').text().replace(/[^\w\s\.]/g, '')},
                 {name: 'limit', value: 5},
                 {name: 'sort_mode', value: 'score_desc'},
             ], (res) => {


=====================================
lib/cypht/modules/tiki/setup.php
=====================================
@@ -323,6 +323,8 @@ return [
     'lookup' => FILTER_SANITIZE_FULL_SPECIAL_CHARS,
     'tracker_id' => FILTER_SANITIZE_FULL_SPECIAL_CHARS,
     'field_id' => FILTER_SANITIZE_FULL_SPECIAL_CHARS,
+    'sort_mode' => FILTER_SANITIZE_FULL_SPECIAL_CHARS,
+    'limit' => FILTER_VALIDATE_INT,
     'in_reply_to' => FILTER_SANITIZE_FULL_SPECIAL_CHARS,
     'auto_move' => FILTER_VALIDATE_BOOLEAN,
     'is_manual_search' => FILTER_VALIDATE_BOOLEAN,


=====================================
lib/cypht/modules/tiki/site.js
=====================================
@@ -847,6 +847,9 @@ $(function() {
 
     cleanUpFooter();
     Hm_Ajax.add_callback_hook('ajax_hm_folders', cleanUpFooter);
+    Hm_Ajax.add_callback_hook('*', function(res, xhr) {
+        $(document).trigger('ajaxComplete', xhr);
+    });
 
     $('.folder_list .search_terms').off('search');
     $('.folder_list .search_terms').on('search', function(e) {



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/9f5df675200fc1f9ae073cc748c36df85a068dcc

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