[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX] manticore: selecting fields return result in proper case

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6968b80125d33_2c181eb0155f0@gitlab-sidekiq-low-urgency-cpu-bound-v2-9fd947f7b-82tz5.mail>

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


Commits:
23473eb1 by Victor Emanouilov at 2026-01-15T11:48:44+02:00
[FIX] manticore: selecting fields return result in proper case

- - - - -


2 changed files:

- lib/core/Search/Manticore/Index.php
- lib/core/Search/Manticore/PdoClient.php


Changes:

=====================================
lib/core/Search/Manticore/Index.php
=====================================
@@ -459,7 +459,11 @@ class Index implements \Search_Index_Interface, \Search_Index_QueryRepository
 
         if ($selectFields = $query->getSelectionFields()) {
             $selectFields = array_map(function ($field) {
-                return strtolower($field);
+                if ($this->isFieldInJson($field)) {
+                    return $field;
+                } else {
+                    return strtolower($field);
+                }
             }, $selectFields);
         } else {
             $selectFields = [];


=====================================
lib/core/Search/Manticore/PdoClient.php
=====================================
@@ -490,6 +490,19 @@ class PdoClient
                         }
                     }
                     unset($row['tracker_fields_json']);
+                } elseif ($selectFields) {
+                    foreach ($row as $rowField => $rowValue) {
+                        foreach ($selectFields as $selectField) {
+                            if ($rowField == $selectField) {
+                                break;
+                            }
+                            if ($rowField != $selectField && $rowField == strtolower($selectField)) {
+                                unset($row[$rowField]);
+                                $row[$selectField] = $rowValue;
+                                break;
+                            }
+                        }
+                    }
                 }
             }
             unset($row);



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/23473eb192a88dc4ac979a84621098dc76ed7b9c

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