Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting in threaded mail view w/ PHP <= 5.2.8 #3960

Closed
rcubetrac opened this issue Oct 10, 2012 · 5 comments
Closed

Sorting in threaded mail view w/ PHP <= 5.2.8 #3960

rcubetrac opened this issue Oct 10, 2012 · 5 comments

Comments

@rcubetrac
Copy link

Reported by stenjan on 10 Oct 2012 16:54 UTC as Trac ticket #1488748

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:

479c479,482
<             $result[= $elem;

---
>             if ($root)
>                 $result[$root]($elem]) = $root;
>             else
>                 $result[$elem] = $elem;
488c491
<         $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.

Keywords: mails, threaded view, sorting
Migrated-From: http://trac.roundcube.net/ticket/1488748

@rcubetrac
Copy link
Author

Comment by @alecpl on 11 Oct 2012 06:51 UTC

Fixed in 485f23b.

@rcubetrac
Copy link
Author

Status changed by @alecpl on 11 Oct 2012 06:51 UTC

new => closed

@rcubetrac
Copy link
Author

Milestone changed by @alecpl on 11 Oct 2012 06:51 UTC

=> 0.9-beta

@rcubetrac
Copy link
Author

Comment by @thomascube on 10 Nov 2012 14:35 UTC

Adjust milestone.

@rcubetrac
Copy link
Author

Milestone changed by @thomascube on 10 Nov 2012 14:35 UTC

0.9-beta => 0.8.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant