aboutsummaryrefslogtreecommitdiffstats
path: root/mod/message.php
diff options
context:
space:
mode:
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;
}