From: Roland Haeder Date: Wed, 5 Apr 2017 20:39:57 +0000 (+0200) Subject: more spaces/curly braces added X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=32ffe4a711022357b9a4738c7d158e260e001d45;p=friendica.git more spaces/curly braces added Signed-off-by: Roland Haeder --- diff --git a/include/bbcode.php b/include/bbcode.php index 19d254000b..70aa1fc8f9 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -9,35 +9,38 @@ require_once('include/Contact.php'); require_once('include/plaintext.php'); function bb_PictureCacheExt($matches) { - if (strpos($matches[3], "data:image/") === 0) + if (strpos($matches[3], "data:image/") === 0) { return ($matches[0]); + } $matches[3] = proxy_url($matches[3]); - return "[img=".$matches[1]."x".$matches[2]."]".$matches[3]."[/img]"; + return "[img=" . $matches[1] . "x" . $matches[2] . "]" . $matches[3] . "[/img]"; } function bb_PictureCache($matches) { - if (strpos($matches[1], "data:image/") === 0) + if (strpos($matches[1], "data:image/") === 0) { return ($matches[0]); + } $matches[1] = proxy_url($matches[1]); - return "[img]".$matches[1]."[/img]"; + return "[img]" . $matches[1] . "[/img]"; } function bb_map_coords($match) { // the extra space in the following line is intentional - return str_replace($match[0],'
' . generate_map(str_replace('/',' ',$match[1])) . '
', $match[0]); + return str_replace($match[0], '
' . generate_map(str_replace('/',' ', $match[1])) . '
', $match[0]); } function bb_map_location($match) { // the extra space in the following line is intentional - return str_replace($match[0],'
' . generate_named_map($match[1]) . '
', $match[0]); + return str_replace($match[0], '
' . generate_named_map($match[1]) . '
', $match[0]); } function bb_attachment($Text, $simplehtml = false, $tryoembed = true) { $data = get_attachment_data($Text); - if (!$data) + if (!$data) { return $Text; + } if (isset($data["title"])) { $data["title"] = strip_tags($data["title"]); @@ -57,83 +60,91 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) { // If the link description is similar to the text above then don't add the link description if (($data["title"] != "") AND ((strpos($test1,$test2) !== false) OR - (similar_text($test1,$test2) / strlen($data["title"])) > 0.9)) + (similar_text($test1,$test2) / strlen($data["title"])) > 0.9)) { $title2 = $data["url"]; + } $text = sprintf('%s
', $data["url"], $data["title"], $title2); - } elseif (($simplehtml != 4) AND ($simplehtml != 0)) + } elseif (($simplehtml != 4) AND ($simplehtml != 0)) { $text = sprintf('%s
', $data["url"], $data["title"]); - else { + } else { $text = sprintf('', $data["type"]); $bookmark = array(sprintf('[bookmark=%s]%s[/bookmark]', $data["url"], $data["title"]), $data["url"], $data["title"]); - if ($tryoembed) + if ($tryoembed) { $oembed = tryoembed($bookmark); - else + } else { $oembed = $bookmark[0]; + } - if (strstr(strtolower($oembed), "