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

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

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


Commits:
bd5015d0 by Victor Emanouilov at 2026-03-16T06:39:50+00: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/bd5015d0634bd5d2972010e2aea6aa5a14d4d019

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