Fix threaded list sorting on PHP < 5.2.9 (#1488748)
| | |
| | | CHANGELOG Roundcube Webmail |
| | | =========================== |
| | | |
| | | - Fix threaded list sorting on PHP < 5.2.9 (#1488748) |
| | | - Plugin API: Add 'email_list' argument for identities data in user_create hook |
| | | - Integrated zipdownload plugin to download all attachments (#1445509) |
| | | - Fix HTML special characters handling in message list/header display (#1488523) |
| | |
| | | $items = explode(self::SEPARATOR_ITEM, $elem); |
| | | $root = (int) array_shift($items); |
| | | |
| | | $result[$elem] = $elem; |
| | | if ($root) { |
| | | $result[$root] = $root; |
| | | foreach ($items as $item) { |
| | | list($lv, $id) = explode(self::SEPARATOR_LEVEL, $item); |
| | | $result[$id] = $root; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // get only unique roots |
| | | $result = array_filter($result); // make sure there are no nulls |
| | | $result = array_unique($result, SORT_NUMERIC); |
| | | $result = array_unique($result); |
| | | |
| | | // Re-sort raw data |
| | | $result = array_fill_keys($result, null); |