[TikiWiki-commits] [Git][tikiwiki/tiki][27.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 <6968b809b678f_2c181a0061129@gitlab-sidekiq-low-urgency-cpu-bound-v2-9fd947f7b-l42dr.mail>

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


Commits:
4f8f460d by Victor Emanouilov at 2026-01-15T11:48:52+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/4f8f460d8afd7ba844cb3b151496178e5d27cbff

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