Skip to content

[NEW][UX] Email folders Tracker Field: Emails should sort from newest (top) to oldest

Eutyche odimba requested to merge keutyche/tiki:cypth into master

https://avan.tech/item84645

there are many ways to solve this task. but i think the best one is in the getfieldData() function since that's where the data is processed. i prefer to do the sorting at this level because if i do it on the $emails variable, the sorting becomes more complex. at this point i would have a multidimensional array that would require two fro or foreach loops which would consume additional resources. the solution is simple but it doesn't work in tiki. the variable $parsed_fields doesn't respond to any php function of the array. by doing a $parsed_fields['date'] i can access the information normally but when i come back with all the sorting method of the array it doesn't respond anymore. i don't understand what's going on. i guess the type of the array is different that's why i'm a little bit lost in it.

Merge request reports