X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FMap.php;h=4fa1d1ca3e08fc0f41c0ec4143718dc03323504d;hb=612e91b603a5a5817839d04d120e1cf672b8a80e;hp=d3ac0216656d608babe25a288c73e772d29477c8;hpb=241ed9a9cd3254db0afe63c78f2c367b6f8a7a05;p=friendica.git diff --git a/src/Util/Map.php b/src/Util/Map.php index d3ac021665..4fa1d1ca3e 100644 --- a/src/Util/Map.php +++ b/src/Util/Map.php @@ -1,10 +1,27 @@ . + * */ + namespace Friendica\Util; -use Friendica\Core\Addon; +use Friendica\Core\Hook; /** * Leaflet Map related functions @@ -14,19 +31,19 @@ class Map { $coord = trim($coord); $coord = str_replace([',','/',' '],[' ',' ',' '],$coord); $arr = ['lat' => trim(substr($coord,0,strpos($coord,' '))), 'lon' => trim(substr($coord,strpos($coord,' ')+1)), 'mode' => $html_mode, 'html' => '']; - Addon::callHooks('generate_map',$arr); + Hook::callAll('generate_map',$arr); return ($arr['html']) ? $arr['html'] : $coord; } public static function byLocation($location, $html_mode = 0) { $arr = ['location' => $location, 'mode' => $html_mode, 'html' => '']; - Addon::callHooks('generate_named_map',$arr); + Hook::callAll('generate_named_map',$arr); return ($arr['html']) ? $arr['html'] : $location; } public static function getCoordinates($location) { $arr = ['location' => $location, 'lat' => false, 'lon' => false]; - Addon::callHooks('Map::getCoordinates', $arr); + Hook::callAll('Map::getCoordinates', $arr); return $arr; } }