aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-11-13 22:01:37 +0100
committerMario Vavti <mario@mariovavti.com>2017-11-13 22:01:37 +0100
commitc8dbcf8a2af7ac3b1a9e26c4c293574f919bd554 (patch)
treeac159d37489f24dd6571246731d2803c2b1bba42 /Zotlabs
parent5dad44402649db9844d735800300d86a8479b3fa (diff)
downloadvolse-hubzilla-c8dbcf8a2af7ac3b1a9e26c4c293574f919bd554.tar.gz
volse-hubzilla-c8dbcf8a2af7ac3b1a9e26c4c293574f919bd554.tar.bz2
volse-hubzilla-c8dbcf8a2af7ac3b1a9e26c4c293574f919bd554.zip
sort combined private mail conversations by latest updated conversation instead of created parent
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Widget/Conversations.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/Zotlabs/Widget/Conversations.php b/Zotlabs/Widget/Conversations.php
index 56510750f..267d50fa0 100644
--- a/Zotlabs/Widget/Conversations.php
+++ b/Zotlabs/Widget/Conversations.php
@@ -28,6 +28,8 @@ class Conversations {
require_once('include/message.php');
+ $o = '';
+
// private_messages_list() can do other more complicated stuff, for now keep it simple
$r = private_messages_list(local_channel(), $mailbox, \App::$pager['start'], \App::$pager['itemspage']);
@@ -36,13 +38,13 @@ class Conversations {
return $o;
}
- $messages = array();
+ $messages = [];
foreach($r as $rr) {
$selected = ((argc() == 3) ? intval(argv(2)) == intval($rr['id']) : $r[0]['id'] == $rr['id']);
- $messages[] = array(
+ $messages[] = [
'mailbox' => $mailbox,
'id' => $rr['id'],
'from_name' => $rr['from']['xchan_name'],
@@ -57,14 +59,14 @@ class Conversations {
'date' => datetime_convert('UTC',date_default_timezone_get(),$rr['created'], 'c'),
'seen' => $rr['seen'],
'selected' => ((argv(1) != 'new') ? $selected : '')
- );
+ ];
}
$tpl = get_markup_template('mail_head.tpl');
- $o .= replace_macros($tpl, array(
+ $o .= replace_macros($tpl, [
'$header' => $header,
'$messages' => $messages
- ));
+ ]);
}
return $o;