]> git.mxchange.org Git - friendica.git/blobdiff - include/event.php
Split the name in the hcard
[friendica.git] / include / event.php
index 4ecc411b78f8ff1f577747aaf76cfc647ea0c834..bc9467dc80217a1c352277ebaf94ef91c4fe6c3d 100644 (file)
@@ -5,13 +5,15 @@
  */
 
 use Friendica\App;
+use Friendica\Content\Feature;
 use Friendica\Core\PConfig;
 use Friendica\Core\System;
 use Friendica\Database\DBM;
+use Friendica\Util\Map;
 
 require_once 'include/bbcode.php';
-require_once 'include/map.php';
 require_once 'include/datetime.php';
+require_once "include/conversation.php";
 
 function format_event_html($ev, $simple = false) {
        if (! ((is_array($ev)) && count($ev))) {
@@ -73,7 +75,7 @@ function format_event_html($ev, $simple = false) {
 
                // Include a map of the location if the [map] BBCode is used.
                if (strpos($ev['location'], "[map") !== false) {
-                       $map = generate_named_map($ev['location']);
+                       $map = Map::byLocation($ev['location']);
                        if ($map !== $ev['location']) {
                                $o.= $map;
                        }
@@ -898,7 +900,7 @@ function widget_events() {
         * for exporting the cal is enabled (otherwise the widget would appear for logged in users
         * on foreigen profile pages even if the widget is disabled).
         */
-       if (intval($owner_uid) && local_user() !== $owner_uid && ! feature_enabled($owner_uid, "export_calendar")) {
+       if (intval($owner_uid) && local_user() !== $owner_uid && ! Feature::isEnabled($owner_uid, "export_calendar")) {
                return;
        }
 
@@ -906,7 +908,7 @@ function widget_events() {
         * If it's a kind of profile page (intval($owner_uid)) return if the user not logged in and
         * export feature isn't enabled.
         */
-       if (intval($owner_uid) && ! local_user() && ! feature_enabled($owner_uid, "export_calendar")) {
+       if (intval($owner_uid) && ! local_user() && ! Feature::isEnabled($owner_uid, "export_calendar")) {
                return;
        }
 
@@ -965,9 +967,9 @@ function format_event_item($item) {
        }
        // Construct the map HTML.
        if (isset($evloc['address'])) {
-               $location['map'] = '<div class="map">' . generate_named_map($evloc['address']) . '</div>';
+               $location['map'] = '<div class="map">' . Map::byLocation($evloc['address']) . '</div>';
        } elseif (isset($evloc['coordinates'])) {
-               $location['map'] = '<div class="map">' . generate_map(str_replace('/', ' ', $evloc['coordinates'])) . '</div>';
+               $location['map'] = '<div class="map">' . Map::byCoordinates(str_replace('/', ' ', $evloc['coordinates'])) . '</div>';
        }
 
        // Construct the profile link (magic-auth).