From 48f15fe6f5822040f2b4e04c59aef502e153192b Mon Sep 17 00:00:00 2001 From: mcramer <m.cramer@pixcept.de> Date: Tue, 09 Jul 2013 04:18:40 -0400 Subject: [PATCH] - Implemented: Virtual columns (columns that are not in the db but shown in the list) can now be sorted if defined correctly --- interface/web/mail/user_quota_stats.php | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/interface/web/mail/user_quota_stats.php b/interface/web/mail/user_quota_stats.php index 4933103..dfc1d8a 100644 --- a/interface/web/mail/user_quota_stats.php +++ b/interface/web/mail/user_quota_stats.php @@ -53,16 +53,21 @@ if($rec['quota'] == 0){ $rec['quota'] = $app->lng('unlimited'); + $rec['percentage'] = ''; + $rec['percentage_sort'] = 0; } else { + $rec['percentage'] = round(100 * $rec['used'] / $rec['quota']) . '%'; + $rec['percentage_sort'] = round(100 * $rec['used'] / $rec['quota']); $rec['quota'] = round($rec['quota'] / 1048576,4).' MB'; } + $rec['used_sort'] = $rec['used']; if($rec['used'] < 1544000) { $rec['used'] = round($rec['used'] / 1024,4).' KB'; } else { $rec['used'] = round($rec['used'] / 1048576,4).' MB'; - } + } //* The variable "id" contains always the index variable $rec['id'] = $rec[$this->idx_key]; -- Gitblit v1.9.1