]> git.mxchange.org Git - friendica.git/blobdiff - include/bbcode.php
Code standards in api_get_user
[friendica.git] / include / bbcode.php
index 196c3ca3c1578e76bf3954ecf542aa53b6ec24b5..be59c180726860a0292f2e10ef0b9e574afbd56f 100644 (file)
@@ -5,11 +5,11 @@ use Friendica\Content\Smilies;
 use Friendica\Core\Cache;
 use Friendica\Core\System;
 use Friendica\Core\Config;
-use Friendica\Object\Contact;
+use Friendica\Model\Contact;
+use Friendica\Util\Map;
 
 require_once 'include/oembed.php';
 require_once 'include/event.php';
-require_once 'include/map.php';
 require_once 'mod/proxy.php';
 require_once 'include/plaintext.php';
 
@@ -33,11 +33,11 @@ function bb_PictureCache($matches) {
 
 function bb_map_coords($match) {
        // the extra space in the following line is intentional
-       return str_replace($match[0], '<div class="map"  >' . generate_map(str_replace('/', ' ', $match[1])) . '</div>', $match[0]);
+       return str_replace($match[0], '<div class="map"  >' . Map::byCoordinates(str_replace('/', ' ', $match[1])) . '</div>', $match[0]);
 }
 function bb_map_location($match) {
        // the extra space in the following line is intentional
-       return str_replace($match[0], '<div class="map"  >' . generate_named_map($match[1]) . '</div>', $match[0]);
+       return str_replace($match[0], '<div class="map"  >' . Map::byLocation($match[1]) . '</div>', $match[0]);
 }
 
 function bb_attachment($Text, $simplehtml = false, $tryoembed = true) {
@@ -376,7 +376,6 @@ function bb_tag_preg_replace($pattern, $replace, $name, $s) {
        return $string;
 }
 
-if (! function_exists('bb_extract_images')) {
 function bb_extract_images($body) {
 
        $saved_image = array();
@@ -418,9 +417,8 @@ function bb_extract_images($body) {
        $new_body = $new_body . $orig_body;
 
        return array('body' => $new_body, 'images' => $saved_image);
-}}
+}
 
-if (! function_exists('bb_replace_images')) {
 function bb_replace_images($body, $images) {
 
        $newbody = $body;
@@ -435,7 +433,7 @@ function bb_replace_images($body, $images) {
        }
 
        return $newbody;
-}}
+}
 
 function bb_ShareAttributes($share, $simplehtml) {
        $attributes = $share[2];