From 5b2c568eb5a2a8b3150a7b8552c7b97b0e700c1e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 25 Sep 2014 12:50:45 +0000 Subject: [PATCH] time also loading of a mail body --- mail/profile.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mail/profile.php b/mail/profile.php index 8aefa7f959..f6c5e68705 100644 --- a/mail/profile.php +++ b/mail/profile.php @@ -156,11 +156,24 @@ function mail_times($acc_id, array &$times, $prefix='mail_') $mail_ui->get_rows($query, $rows, $readonlys); $fetchtime = microtime(true); + if (isset($_GET['uid']) && (int)$_GET['uid'] > 0) + { + $uid = (int)$_GET['uid']; + } + else // use uid of first returned row + { + $row = array_shift($rows); + $uid = $row['uid']; + } + $mail_ui->get_load_email_data($uid, null, 'INBOX'); + $bodytime = microtime(true); + $times += array( $prefix.'login' => $logintime - $starttime, $prefix.'listmailboxes' => $listmailboxestime - $logintime, $prefix.'fetch' => $fetchtime - $listmailboxestime, $prefix.'total' => $fetchtime - $starttime, + $prefix.'body' => $bodytime - $fetchtime, //$prefix.'mboxes' => $mboxes, ); unset($mboxes);