aboutsummaryrefslogtreecommitdiffstats
path: root/mod/mail.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/mail.php')
-rw-r--r--mod/mail.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/mod/mail.php b/mod/mail.php
index 37679aebf..1b0ea17c4 100644
--- a/mod/mail.php
+++ b/mod/mail.php
@@ -9,7 +9,7 @@ require_once('include/Contact.php');
function mail_post(&$a) {
- if(! local_user())
+ if(! local_channel())
return;
$replyto = ((x($_REQUEST,'replyto')) ? notags(trim($_REQUEST['replyto'])) : '');
@@ -79,12 +79,12 @@ function mail_post(&$a) {
}
}
-// if(feature_enabled(local_user(),'richtext')) {
+// if(feature_enabled(local_channel(),'richtext')) {
// $body = fix_mce_lf($body);
// }
require_once('include/text.php');
- linkify_tags($a, $body, local_user());
+ linkify_tags($a, $body, local_channel());
if(! $recipient) {
notice('No recipient found.');
@@ -93,7 +93,7 @@ function mail_post(&$a) {
return;
}
- // We have a local_user, let send_message use the session channel and save a lookup
+ // We have a local_channel, let send_message use the session channel and save a lookup
$ret = send_message(0, $recipient, $body, $subject, $replyto, $expires);
@@ -110,7 +110,7 @@ function mail_content(&$a) {
$o = '';
nav_set_selected('messages');
- if(! local_user()) {
+ if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return login();
}
@@ -119,7 +119,7 @@ function mail_content(&$a) {
head_set_icon($channel['xchan_photo_s']);
- $cipher = get_pconfig(local_user(),'system','default_cipher');
+ $cipher = get_pconfig(local_channel(),'system','default_cipher');
if(! $cipher)
$cipher = 'aes256';
@@ -134,7 +134,7 @@ function mail_content(&$a) {
return;
$cmd = argv(1);
- $r = private_messages_drop(local_user(), argv(2));
+ $r = private_messages_drop(local_channel(), argv(2));
if($r) {
info( t('Message deleted.') . EOL );
}
@@ -148,7 +148,7 @@ function mail_content(&$a) {
$r = q("update mail set mail_flags = mail_flags | %d where id = %d and channel_id = %d",
intval(MAIL_RECALLED),
intval(argv(2)),
- intval(local_user())
+ intval(local_channel())
);
proc_run('php','include/notifier.php','mail',intval(argv(2)));
@@ -184,7 +184,7 @@ function mail_content(&$a) {
if(x($_REQUEST,'hash')) {
$r = q("select abook.*, xchan.* from abook left join xchan on abook_xchan = xchan_hash
where abook_channel = %d and abook_xchan = '%s' limit 1",
- intval(local_user()),
+ intval(local_channel()),
dbesc($_REQUEST['hash'])
);
if($r) {
@@ -199,7 +199,7 @@ function mail_content(&$a) {
if($preselect) {
$r = q("select abook.*, xchan.* from abook left join xchan on abook_xchan = xchan_hash
where abook_channel = %d and abook_id = %d limit 1",
- intval(local_user()),
+ intval(local_channel()),
intval(argv(2))
);
if($r) {
@@ -241,9 +241,9 @@ function mail_content(&$a) {
'$wait' => t('Please wait'),
'$submit' => t('Send'),
'$defexpire' => '',
- '$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? true : false),
+ '$feature_expire' => ((feature_enabled(local_channel(),'content_expire')) ? true : false),
'$expires' => t('Set expiration date'),
- '$feature_encrypt' => ((feature_enabled(local_user(),'content_encrypt')) ? true : false),
+ '$feature_encrypt' => ((feature_enabled(local_channel(),'content_encrypt')) ? true : false),
'$encrypt' => t('Encrypt text'),
'$cipher' => $cipher,
@@ -260,10 +260,10 @@ function mail_content(&$a) {
$plaintext = true;
-// if( local_user() && feature_enabled(local_user(),'richtext') )
+// if( local_channel() && feature_enabled(local_channel(),'richtext') )
// $plaintext = false;
- $messages = private_messages_fetch_conversation(local_user(), argv(1), true);
+ $messages = private_messages_fetch_conversation(local_channel(), argv(1), true);
if(! $messages) {
info( t('Message not found.') . EOL);
@@ -355,9 +355,9 @@ function mail_content(&$a) {
'$submit' => t('Submit'),
'$wait' => t('Please wait'),
'$defexpire' => '',
- '$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? true : false),
+ '$feature_expire' => ((feature_enabled(local_channel(),'content_expire')) ? true : false),
'$expires' => t('Set expiration date'),
- '$feature_encrypt' => ((feature_enabled(local_user(),'content_encrypt')) ? true : false),
+ '$feature_encrypt' => ((feature_enabled(local_channel(),'content_encrypt')) ? true : false),
'$encrypt' => t('Encrypt text'),
'$cipher' => $cipher,