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

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


Commits:
b6d992a2 by Victor Emanouilov at 2026-01-15T11:48:34+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/b6d992a2f28815936485d33a5bf5a015de83e180

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