aboutsummaryrefslogtreecommitdiffstats
path: root/mod/message.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-09-24 23:32:18 +0200
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-09-24 23:32:18 +0200
commit414b5ea6f3ad616c5211b0e9d4b811c149decf26 (patch)
tree58d7a19079cc1c7de0790b0e2f3b829967344ea1 /mod/message.php
parent8cbccb20ef7f1fa82c4a16c6c786d5d748901c02 (diff)
parentc42dcd5ac9c63cd42c7af1b2765dd33e7e9f5d6d (diff)
downloadvolse-hubzilla-414b5ea6f3ad616c5211b0e9d4b811c149decf26.tar.gz
volse-hubzilla-414b5ea6f3ad616c5211b0e9d4b811c149decf26.tar.bz2
volse-hubzilla-414b5ea6f3ad616c5211b0e9d4b811c149decf26.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/message.php')
-rw-r--r--mod/message.php37
1 files changed, 29 insertions, 8 deletions
diff --git a/mod/message.php b/mod/message.php
index 9f62f6b61..f8d71aa44 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -25,8 +25,6 @@ function message_content(&$a) {
$cipher = 'aes256';
-
-
if((argc() == 3) && (argv(1) === 'dropconv')) {
if(! intval(argv(2)))
return;
@@ -34,14 +32,31 @@ function message_content(&$a) {
$r = private_messages_drop(local_channel(), argv(2), true);
if($r)
info( t('Conversation removed.') . EOL );
- goaway($a->get_baseurl(true) . '/message' );
+ goaway($a->get_baseurl(true) . '/mail/combined' );
}
- if(argc() == 1) {
-
+/*
+ if(argc() == 2) {
+
+ switch(argv(1)) {
+ case 'combined':
+ $mailbox = 'combined';
+ $header = t('Conversations');
+ break;
+ case 'inbox':
+ $mailbox = 'inbox';
+ $header = t('Received Messages');
+ break;
+ case 'outbox':
+ $mailbox = 'outbox';
+ $header = t('Sent Messages');
+ break;
+ default:
+ break;
+ }
// private_messages_list() can do other more complicated stuff, for now keep it simple
- $r = private_messages_list(local_channel(), '', $a->pager['start'], $a->pager['itemspage']);
+ $r = private_messages_list(local_channel(), $mailbox, $a->pager['start'], $a->pager['itemspage']);
if(! $r) {
info( t('No messages.') . EOL);
@@ -51,6 +66,7 @@ function message_content(&$a) {
$messages = array();
foreach($r as $rr) {
+
$messages[] = array(
'id' => $rr['id'],
'from_name' => $rr['from']['xchan_name'],
@@ -70,14 +86,19 @@ function message_content(&$a) {
$tpl = get_markup_template('mail_head.tpl');
$o = replace_macros($tpl, array(
- '$header' => t('Messages'),
+ '$header' => $header,
'$messages' => $messages
));
$o .= alt_pager($a,count($r));
+
return $o;
- }
+ return;
+
+ }
+*/
+ return;
}