diff --git a/mod/message.php b/mod/message.php index 01bbae7f5..f358ba975 100644 --- a/mod/message.php +++ b/mod/message.php @@ -78,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(); @@ -105,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'); @@ -131,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; @@ -184,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']) { //