X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fmessage.php;h=0ed2b98841a4dcc9b1aab912ed369234955aac12;hb=f479692966f67ef84fa07dd6c571622b361202ca;hp=97c65863209441b3749a4012c69cfc3e6da89dd4;hpb=647802f92eec823ab47a15c5355c5d14bbae4dc9;p=friendica.git diff --git a/mod/message.php b/mod/message.php index 97c6586320..0ed2b98841 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', '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) { @@ -46,11 +53,15 @@ function message_post(&$a) { // Work around doubled linefeeds in Tinymce 3.5b2 - $plaintext = intval(get_pconfig(local_user(),'system','plaintext')); +/* $plaintext = intval(get_pconfig(local_user(),'system','plaintext') && !feature_enabled(local_user(),'richtext')); + if(! $plaintext) { + $body = fix_mce_lf($body); + }*/ + $plaintext = intval(!feature_enabled(local_user(),'richtext')); if(! $plaintext) { $body = fix_mce_lf($body); } - + $ret = send_message($recipient, $body, $subject, $replyto); $norecip = false; @@ -78,6 +89,8 @@ function message_post(&$a) { $a->argc = 2; $a->argv[1] = 'new'; } + else + goaway($a->get_baseurl(true) . '/' . $_SESSION['return_url']); } @@ -133,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]'); @@ -181,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']) { + //