X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=mod%2Fmessage.php;h=734bf3471017dd49560daa474f68a718ed3d466c;hb=1f7f964bb7200d4f658742a999c07f1dd6cbe97c;hp=7ca3fba70af9e939b744ca45b9cdec7797162a22;hpb=685a677bc91c38dc2f59d3565d6c413bca84629d;p=friendica.git diff --git a/mod/message.php b/mod/message.php index 7ca3fba70a..734bf34710 100644 --- a/mod/message.php +++ b/mod/message.php @@ -4,13 +4,20 @@ require_once('include/acl_selectors.php'); require_once('include/message.php'); function message_init(&$a) { - $tabs = array(); + + $tabs = ''; + + if ($a->argc >1 && is_numeric($a->argv[1])) { + $tabs = render_messages(get_messages(local_user(),0,5), 'mail_list.tpl'); + } + $new = array( 'label' => t('New Message'), - 'url' => $a->get_baseurl(true) . '/message/new', + 'url' => 'message/new', 'sel'=> ($a->argv[1] == 'new'), + 'accesskey' => 'm', ); - + $tpl = get_markup_template('message_side.tpl'); $a->page['aside'] = replace_macros($tpl, array( '$tabs'=>$tabs, @@ -29,7 +36,7 @@ function message_init(&$a) { '$baseurl' => $a->get_baseurl(true), '$base' => $base )); - + } function message_post(&$a) { @@ -54,7 +61,7 @@ function message_post(&$a) { if(! $plaintext) { $body = fix_mce_lf($body); } - + $ret = send_message($recipient, $body, $subject, $replyto); $norecip = false; @@ -82,6 +89,8 @@ function message_post(&$a) { $a->argc = 2; $a->argv[1] = 'new'; } + else + goaway($_SESSION['return_url']); } @@ -137,7 +146,7 @@ function item_redir_and_replace_images($body, $images, $cid) { for($i = 0; $i < count($images); $i++) { $search = '/\[url\=(.*?)\]\[!#saved_image' . $i . '#!\]\[\/url\]' . '/is'; - $replace = '[url=' . z_path() . '/redir/' . $cid + $replace = '[url=' . z_path() . '/redir/' . $cid . '?f=1&url=' . '$1' . '][!#saved_image' . $i . '#!][/url]' ; $img_end = strpos($origbody, '[!#saved_image' . $i . '#!][/url]') + strlen('[!#saved_image' . $i . '#!][/url]'); @@ -173,7 +182,7 @@ function message_content(&$a) { return; } - $myprofile = $a->get_baseurl(true) . '/profile/' . $a->user['nickname']; + $myprofile = 'profile/' . $a->user['nickname']; $tpl = get_markup_template('mail_head.tpl'); $header = replace_macros($tpl, array( @@ -185,6 +194,36 @@ function message_content(&$a) { if(($a->argc == 3) && ($a->argv[1] === 'drop' || $a->argv[1] === 'dropconv')) { if(! intval($a->argv[2])) return; + + // Check if we should do HTML-based delete confirmation + if($_REQUEST['confirm']) { + //