collectiveaccess / providence

Cataloguing and data/media management application
GNU General Public License v3.0
290 stars 166 forks source link

NOJIRA : dont_use_natural_sort and idno_sort #1540

Closed gautiermichelin closed 1 month ago

gautiermichelin commented 4 months ago

Hi CA team,

We found an issue when enabling dont_use_natural_sort inside search.conf.

Inside BaseFindEngine, R 518 :

                $vn_sort_mode = SORT_FLAG_CASE;
                if (!$o_conf->get('dont_use_natural_sort')) { $vn_sort_mode |= SORT_NATURAL; } else { $vn_sort_mode |= SORT_STRING; }

                ksort($va_sort_buffer, $vn_sort_mode);

This disable the purpose of idno_sort, arranging 2012.0.12 between 2012.0.1 and 2012.0.2.

Would you edit the comment of search.conf for this row ?

# This is usually what is wanted, but for some languages (Eg. Spanish) it can return odd results and it may be desirable to disable it. Note that it would disable idno_sorting and sort idnos alphabetically.

I didn't send a pull request because I don't now if my phrasing of it is side-effect. Maybe natural ksort should not be used when sorting by idnos, but can't answer that.

Best,

Gautier

collectiveaccess commented 4 months ago

What version is this from? It's not in dev/php8.