Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#1488748 closed Bug Patches (fixed)

Sorting in threaded mail view w/ PHP <= 5.2.8

Reported by: stenjan Owned by:
Priority: 9 Milestone: 0.8.3
Component: Core functionality Version: 0.8.1
Severity: normal Keywords: mails, threaded view, sorting


We are running RoundCube 0.8.1 with PHP 5.2.6 (minimum requirement according to INSTALL file: 5.2.1). Changing the sort order when having the threaded mail view enabled does not have any effect on the order in which mails are listed.

Having tracked down the problem, we found that program/include/rcube_result_thread::sort invokes array_unique($result, SORT_NUMERIC), but the sort_flags first appeared in PHP 5.2.9. The following patch for program/include/rcube_result_thread.php seems to do the trick for us:

<             $result[$elem] = $elem;
>             if ($root)
>                 $result[$root] = $root;
>             else
>                 $result[$elem] = $elem;
<         $result = array_unique($result, SORT_NUMERIC);
>         $result = array_unique($result);

This might also be relevant for future releases, as RoundCube 0.8.2 seems to have the same problem.

Change History (2)

comment:1 Changed 3 years ago by alec

  • Milestone set to 0.9-beta
  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 3 years ago by thomasb

  • Milestone changed from 0.9-beta to 0.8.3

Adjust milestone.

Note: See TracTickets for help on using tickets.