Closed uaon closed 3 years ago
This is Post-change, filling in as for documentation for changes done.
xenforo/src/addons/NF/Calendar/Pub/Controller/Calendar.php Line 150
xenforo/src/addons/NF/Calendar/Pub/Controller/Calendar.php
protected function setupEventCreate(CalendarEntity $calendar) { /** @var \NF\Calendar\Service\Event\Creator $creator */ $IMO_BOT_ID = 598; $user = \XF::finder('XF:User')->where('user_id', $IMO_BOT_ID )->fetchOne(); $creator = \XF::asVisitor($user, function() use ($calendar) { return $this->service('NF\Calendar:Event\Creator', $calendar); });
xenforo/src/addons/NF/Calendar/Service/Event/Creator.php Line 294
xenforo/src/addons/NF/Calendar/Service/Event/Creator.php
protected function setupEventThreadCreation(\XF\Entity\Forum $forum) { $IMO_BOT_ID = 598; $user = \XF::finder('XF:User')->where('user_id', $IMO_BOT_ID )->fetchOne(); $title = $this->event->getExpectedThreadTitle(); $message = $this->getThreadMessage(); $prefix = $this->calendar->thread_prefix_id; $creator = \XF::asVisitor($user, function() use ($forum, $title, $message, $prefix) { $creator = \XF::service('XF:Thread\Creator', $forum); $creator->setContent($title, $message, false); $creator->setPrefix($prefix); $creator->setDiscussionTypeAndDataRaw('nf_calendar_event'); $creator->setIsAutomated(); return $creator; });
This is Post-change, filling in as for documentation for changes done.
xenforo/src/addons/NF/Calendar/Pub/Controller/Calendar.php
Line 150xenforo/src/addons/NF/Calendar/Service/Event/Creator.php
Line 294