From e48f8945b32ab5b67f1cdeb53a37d3d196e31e4d Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 20 May 2016 05:19:01 -0400
Subject: [PATCH] Fix bug where message list columns could be in wrong order after column drag-n-drop and list sorting
---
program/lib/Roundcube/rcube_result_thread.php | 19 ++++---------------
1 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/program/lib/Roundcube/rcube_result_thread.php b/program/lib/Roundcube/rcube_result_thread.php
index 1687616..995d794 100644
--- a/program/lib/Roundcube/rcube_result_thread.php
+++ b/program/lib/Roundcube/rcube_result_thread.php
@@ -252,22 +252,11 @@
return;
}
+ $data = explode(self::SEPARATOR_ELEMENT, $this->raw_data);
+ $data = array_reverse($data);
+ $this->raw_data = implode(self::SEPARATOR_ELEMENT, $data);
+
$this->meta['pos'] = array();
- $datalen = strlen($this->raw_data);
- $result = '';
- $start = 0;
-
- while (($pos = @strpos($this->raw_data, self::SEPARATOR_ELEMENT, $start))
- || ($start < $datalen && ($pos = $datalen))
- ) {
- $len = $pos - $start;
- $elem = substr($this->raw_data, $start, $len);
- $start = $pos + 1;
-
- $result = $elem . self::SEPARATOR_ELEMENT . $result;
- }
-
- $this->raw_data = rtrim($result, self::SEPARATOR_ELEMENT);
}
--
Gitblit v1.9.1