X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fmessage.php;h=f358ba975a5c2d0807b28e202255b3c0cd31e9dd;hb=d0dfcc71a82ac423db68a12fd2eaf6d13cb18e1f;hp=beaa7b1df666af66b426d01f821f0b790f7765d8;hpb=3592f909105d09ac7d4d7bfebe47f4b3921763d6;p=friendica.git diff --git a/mod/message.php b/mod/message.php index beaa7b1df6..f358ba975a 100644 --- a/mod/message.php +++ b/mod/message.php @@ -1,5 +1,8 @@ $tabs, '$new'=>$new, )); - $base = App::get_baseurl(); + $base = System::baseUrl(); $head_tpl = get_markup_template('message-head.tpl'); $a->page['htmlhead'] .= replace_macros($head_tpl,array( - '$baseurl' => App::get_baseurl(true), + '$baseurl' => System::baseUrl(true), '$base' => $base )); $end_tpl = get_markup_template('message-end.tpl'); $a->page['end'] .= replace_macros($end_tpl,array( - '$baseurl' => App::get_baseurl(true), + '$baseurl' => System::baseUrl(true), '$base' => $base )); @@ -75,18 +78,17 @@ function message_post(App $a) { // fake it to go back to the input form if no recipient listed - if($norecip) { + if ($norecip) { $a->argc = 2; $a->argv[1] = 'new'; - } - else + } else goaway($_SESSION['return_url']); } // Note: the code in 'item_extract_images' and 'item_redir_and_replace_images' // is identical to the code in include/conversation.php -if(! function_exists('item_extract_images')) { +if (! function_exists('item_extract_images')) { function item_extract_images($body) { $saved_image = array(); @@ -102,20 +104,19 @@ function item_extract_images($body) { $img_st_close++; // make it point to AFTER the closing bracket $img_end += $img_start; - if(! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) { + if (! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) { // This is an embedded image $saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - ($img_start + $img_st_close)); $new_body = $new_body . substr($orig_body, 0, $img_start) . '[!#saved_image' . $cnt . '#!]'; $cnt++; - } - else + } else $new_body = $new_body . substr($orig_body, 0, $img_end + strlen('[/img]')); $orig_body = substr($orig_body, $img_end + strlen('[/img]')); - if($orig_body === false) // in case the body ends on a closing image tag + if ($orig_body === false) // in case the body ends on a closing image tag $orig_body = ''; $img_start = strpos($orig_body, '[img'); @@ -128,7 +129,7 @@ function item_extract_images($body) { return array('body' => $new_body, 'images' => $saved_image); }} -if(! function_exists('item_redir_and_replace_images')) { +if (! function_exists('item_redir_and_replace_images')) { function item_redir_and_replace_images($body, $images, $cid) { $origbody = $body; @@ -136,7 +137,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=' . System::baseUrl() . '/redir/' . $cid . '?f=1&url=' . '$1' . '][!#saved_image' . $i . '#!][/url]' ; $img_end = strpos($origbody, '[!#saved_image' . $i . '#!][/url]') + strlen('[!#saved_image' . $i . '#!][/url]'); @@ -172,7 +173,7 @@ function message_content(App $a) { return; } - $myprofile = App::get_baseurl().'/profile/' . $a->user['nickname']; + $myprofile = System::baseUrl().'/profile/' . $a->user['nickname']; $tpl = get_markup_template('mail_head.tpl'); $header = replace_macros($tpl, array( @@ -181,18 +182,18 @@ function message_content(App $a) { )); - if(($a->argc == 3) && ($a->argv[1] === 'drop' || $a->argv[1] === 'dropconv')) { - if(! intval($a->argv[2])) + 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']) { + if ($_REQUEST['confirm']) { //