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

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

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


Commits:
cc9a6b94 by Victor Emanouilov at 2026-03-16T08:50:14+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/cc9a6b946bb581900741f9d1b48d981adda4fe7d

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