aboutsummaryrefslogtreecommitdiffstats
path: root/mod/message.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/message.php')
-rw-r--r--mod/message.php21
1 files changed, 15 insertions, 6 deletions
diff --git a/mod/message.php b/mod/message.php
index 98a1067ed..9c6cf75a6 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -9,13 +9,20 @@ require_once('include/Contact.php');
function message_aside(&$a) {
- $a->set_widget('newmessage',replace_macros(get_markup_template('message_side.tpl'), array(
+ $a->set_widget('msgaside',replace_macros(get_markup_template('message_side.tpl'), array(
'$tabs'=> array(),
+
+ '$check'=>array(
+ 'label' => t('Check Mail'),
+ 'url' => $a->get_baseurl(true) . '/message',
+ 'sel' => (argv(1) == ''),
+ ),
'$new'=>array(
'label' => t('New Message'),
'url' => $a->get_baseurl(true) . '/message/new',
'sel'=> (argv(1) == 'new'),
)
+
)));
}
@@ -41,7 +48,7 @@ function message_post(&$a) {
$ret = zot_finger($rstr,$channel);
- if(! $ret) {
+ if(! $ret['success']) {
notice( t('Unable to lookup recipient.') . EOL);
return;
}
@@ -160,9 +167,10 @@ function item_redir_and_replace_images($body, $images, $cid) {
$newbody = '';
for($i = 0; $i < count($images); $i++) {
- $search = '/\[url\=(.*?)\]\[!#saved_image' . $i . '#!\]\[\/url\]' . '/is';
- $replace = '[url=' . z_path() . '/redir/' . $cid
- . '?f=1&url=' . '$1' . '][!#saved_image' . $i . '#!][/url]' ;
+ $search = '/\[zrl\=(.*?)\]\[!#saved_image' . $i . '#!\]\[\/zrl\]' . '/is';
+//FIXME
+ $replace = '[zrl=' . z_path() . '/redir/' . $cid
+ . '?f=1&url=' . '$1' . '][!#saved_image' . $i . '#!][/zrl]' ;
$img_end = strpos($origbody, '[!#saved_image' . $i . '#!][/url]') + strlen('[!#saved_image' . $i . '#!][/url]');
$process_part = substr($origbody, 0, $img_end);
@@ -198,6 +206,7 @@ function message_content(&$a) {
}
$channel = $a->get_channel();
+ head_set_icon($channel['xchan_photo_s']);
$tpl = get_markup_template('mail_head.tpl');
$header = replace_macros($tpl, array(
@@ -392,7 +401,7 @@ function message_content(&$a) {
// FIXME - move this HTML to template
$select = $message[$recp]['xchan_name'] . '<input type="hidden" name="messageto" value="' . $message[$recp]['xchan_hash'] . '" />';
- $parent = '<input type="hidden" name="replyto" value="' . $message['parent_uri'] . '" />';
+ $parent = '<input type="hidden" name="replyto" value="' . $message['parent_mid'] . '" />';
$tpl = get_markup_template('mail_display.tpl');
$o = replace_macros($tpl, array(