X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FEvent.php;h=6f8ed123c17396bc4fd6e45f8405e13e33018967;hb=d53f46b9583737668a3314a22d1eeacb00a47db2;hp=4055ca63b45f12190168072b47539b7201c10316;hpb=0a4119adaf6294bf43d135a0f435c1dd677c50e0;p=friendica.git
diff --git a/src/Model/Event.php b/src/Model/Event.php
index 4055ca63b4..6f8ed123c1 100644
--- a/src/Model/Event.php
+++ b/src/Model/Event.php
@@ -1,14 +1,30 @@
.
+ *
*/
namespace Friendica\Model;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
use Friendica\Core\Logger;
+use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\Database\DBA;
@@ -31,15 +47,15 @@ class Event
return '';
}
- $bd_format = L10n::t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8 AM.
+ $bd_format = DI::l10n()->t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8 AM.
- $event_start = L10n::getDay(
+ $event_start = DI::l10n()->getDay(
!empty($event['adjust']) ?
DateTimeFormat::local($event['start'], $bd_format) : DateTimeFormat::utc($event['start'], $bd_format)
);
if (!empty($event['finish'])) {
- $event_end = L10n::getDay(
+ $event_end = DI::l10n()->getDay(
!empty($event['adjust']) ?
DateTimeFormat::local($event['finish'], $bd_format) : DateTimeFormat::utc($event['finish'], $bd_format)
);
@@ -58,14 +74,14 @@ class Event
$o .= "
" . BBCode::convert(Strings::escapeHtml($event['desc']), false, $simple) . "
";
}
- $o .= "" . L10n::t('Starts:') . "
" . $event_start . "
";
+ $o .= "" . DI::l10n()->t('Starts:') . "
" . $event_start . "
";
if (!$event['nofinish']) {
- $o .= "" . L10n::t('Finishes:') . "
" . $event_end . "
";
+ $o .= "" . DI::l10n()->t('Finishes:') . "
" . $event_end . "
";
}
if (!empty($event['location'])) {
- $o .= "" . L10n::t('Location:') . "
" . BBCode::convert(Strings::escapeHtml($event['location']), false, $simple) . "
";
+ $o .= "" . DI::l10n()->t('Location:') . "
" . BBCode::convert(Strings::escapeHtml($event['location']), false, $simple) . "
";
}
return $o;
@@ -75,13 +91,13 @@ class Event
$o .= '' . BBCode::convert(Strings::escapeHtml($event['summary']), false, $simple) . '
' . "\r\n";
- $o .= '' . L10n::t('Starts:') . ' ' . DI::l10n()->t('Starts:') . ' ' . $event_start
. '
' . "\r\n";
if (!$event['nofinish']) {
- $o .= '' . L10n::t('Finishes:') . ' ' . DI::l10n()->t('Finishes:') . ' ' . $event_end
. '
' . "\r\n";
@@ -92,7 +108,7 @@ class Event
}
if (!empty($event['location'])) {
- $o .= '' . L10n::t('Location:') . ' '
+ $o .= '' . DI::l10n()->t('Location:') . ' '
. BBCode::convert(Strings::escapeHtml($event['location']), false, $simple)
. '
' . "\r\n";
@@ -355,6 +371,7 @@ class Event
$item_arr['origin'] = $event['cid'] === 0 ? 1 : 0;
$item_arr['body'] = self::getBBCode($event);
$item_arr['event-id'] = $event['id'];
+ $item_arr['network'] = Protocol::DFRN;
$item_arr['object'] = '