aboutsummaryrefslogtreecommitdiffstats
path: root/mod/message.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-09-24 14:07:44 +0200
committerMario Vavti <mario@mariovavti.com>2015-09-24 14:07:44 +0200
commitb9723aa85bb10347ca28df0e15b16dabea11ec1d (patch)
tree807d13d17606303a2bccad06f7328d85daa023cb /mod/message.php
parente04f04ef0f79d938576668c57d7240d376155a8a (diff)
downloadvolse-hubzilla-b9723aa85bb10347ca28df0e15b16dabea11ec1d.tar.gz
volse-hubzilla-b9723aa85bb10347ca28df0e15b16dabea11ec1d.tar.bz2
volse-hubzilla-b9723aa85bb10347ca28df0e15b16dabea11ec1d.zip
some heavy private mail restructuring - work in progress
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;
}