[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [FIX] manticore numeric identifier comparison data types

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69b7a83610db7_3b18dfd02525e@gitlab-sidekiq-low-urgency-cpu-bound-v2-7b9d8bb858-qzhx7.mail>

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


Commits:
7e9ba3f0 by Victor Emanouilov at 2026-03-16T08:50:23+02:00
[FIX] manticore numeric identifier comparison data types

See merge request tikiwiki/tiki!9755

- - - - -


1 changed file:

- lib/core/Search/Manticore/QueryBuilder.php


Changes:

=====================================
lib/core/Search/Manticore/QueryBuilder.php
=====================================
@@ -271,7 +271,7 @@ class QueryBuilder
             $terms = $this->getQuoted($node);
             if (is_array($terms)) {
                 $key = 'tf_' . uniqid();
-                $terms = implode(',', array_filter(array_map(function ($v) use ($field) {
+                $terms = implode(',', array_filter(array_map(function ($v) {
                     if (is_scalar($v)) {
                         return $this->pdo_client->quote(strval($v));
                     } else {
@@ -285,9 +285,15 @@ class QueryBuilder
                 }
                 return "$key = 1";
             }
-            if ($node->getType() == 'identifier' || str_ends_with($field, '_ts')) {
+            if (str_ends_with($field, '_ts')) {
                 $value = $this->getQuoted($node);
                 return "{$field} = $value";
+            } elseif ($node->getType() == 'identifier') {
+                $raw = $this->getRaw($node);
+                $value = $this->pdo_client->quote(strval($raw));
+                $key = 'tf_' . uniqid();
+                $this->select[$key] = "TO_STRING({$field}) = $value";
+                return "$key = 1";
             } else {
                 $value = $this->getQuoted($node, '(?i)');
                 $key = 'tf_' . uniqid();



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/7e9ba3f066ee0d3ff9bc9eca6ca0f1e41f41c1d6

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/7e9ba3f066ee0d3ff9bc9eca6ca0f1e41f41c1d6
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
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.