]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Event.php
Merge pull request #10133 from annando/notice
[friendica.git] / src / Model / Event.php
index ab567e03f38e62a04035a55eeb41b70b8589a6d9..d2bc6ab86a7e6760ac14202c1be6a9111ebd1564 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -381,6 +381,7 @@ class Event
                                $item_arr['visible']       = 1;
                                $item_arr['verb']          = Activity::POST;
                                $item_arr['object-type']   = Activity\ObjectType::EVENT;
+                               $item_arr['post-type']     = Item::PT_EVENT;
                                $item_arr['origin']        = $event['cid'] === 0 ? 1 : 0;
                                $item_arr['body']          = self::getBBCode($event);
                                $item_arr['event-id']      = $event['id'];
@@ -518,7 +519,7 @@ class Event
                // Query for the event by event id
                $events = DBA::toArray(DBA::p("SELECT `event`.*, `post-user-view`.`id` AS `itemid` FROM `event`
                        LEFT JOIN `post-user-view` ON `post-user-view`.`event-id` = `event`.`id` AND `post-user-view`.`uid` = `event`.`uid`
-                       WHERE `event`.`uid` = %d AND `event`.`id` = %d $sql_extra",
+                       WHERE `event`.`uid` = ? AND `event`.`id` = ? $sql_extra",
                        $owner_uid, $event_id));
 
                if (DBA::isResult($events)) {