Some removed notices when viewing events (#5483)
This commit is contained in:
parent
a38a842e86
commit
ca2c316de0
2 changed files with 21 additions and 9 deletions
|
@ -34,14 +34,18 @@ class Event extends BaseObject
|
||||||
$bd_format = L10n::t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8 AM.
|
$bd_format = L10n::t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8 AM.
|
||||||
|
|
||||||
$event_start = day_translate(
|
$event_start = day_translate(
|
||||||
$event['adjust'] ?
|
!empty($event['adjust']) ?
|
||||||
DateTimeFormat::local($event['start'], $bd_format) : DateTimeFormat::utc($event['start'], $bd_format)
|
DateTimeFormat::local($event['start'], $bd_format) : DateTimeFormat::utc($event['start'], $bd_format)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!empty($event['finish'])) {
|
||||||
$event_end = day_translate(
|
$event_end = day_translate(
|
||||||
$event['adjust'] ?
|
!empty($event['adjust']) ?
|
||||||
DateTimeFormat::local($event['finish'], $bd_format) : DateTimeFormat::utc($event['finish'], $bd_format)
|
DateTimeFormat::local($event['finish'], $bd_format) : DateTimeFormat::utc($event['finish'], $bd_format)
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
$event_end = '';
|
||||||
|
}
|
||||||
|
|
||||||
if ($simple) {
|
if ($simple) {
|
||||||
$o = "<h3>" . BBCode::convert($event['summary'], false, $simple) . "</h3>";
|
$o = "<h3>" . BBCode::convert($event['summary'], false, $simple) . "</h3>";
|
||||||
|
@ -66,7 +70,7 @@ class Event extends BaseObject
|
||||||
$o .= '<div class="summary event-summary">' . BBCode::convert($event['summary'], false, $simple) . '</div>' . "\r\n";
|
$o .= '<div class="summary event-summary">' . BBCode::convert($event['summary'], false, $simple) . '</div>' . "\r\n";
|
||||||
|
|
||||||
$o .= '<div class="event-start"><span class="event-label">' . L10n::t('Starts:') . '</span> <span class="dtstart" title="'
|
$o .= '<div class="event-start"><span class="event-label">' . L10n::t('Starts:') . '</span> <span class="dtstart" title="'
|
||||||
. DateTimeFormat::utc($event['start'], (($event['adjust']) ? DateTimeFormat::ATOM : 'Y-m-d\TH:i:s'))
|
. DateTimeFormat::utc($event['start'], (!empty($event['adjust']) ? DateTimeFormat::ATOM : 'Y-m-d\TH:i:s'))
|
||||||
. '" >' . $event_start
|
. '" >' . $event_start
|
||||||
. '</span></div>' . "\r\n";
|
. '</span></div>' . "\r\n";
|
||||||
|
|
||||||
|
@ -863,6 +867,11 @@ class Event extends BaseObject
|
||||||
if (substr($dtstart_title, 0, 10) === substr($dtend_title, 0, 10)) {
|
if (substr($dtstart_title, 0, 10) === substr($dtend_title, 0, 10)) {
|
||||||
$same_date = true;
|
$same_date = true;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$dtend_title = '';
|
||||||
|
$dtend_dt = '';
|
||||||
|
$end_time = '';
|
||||||
|
$end_short = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Format the event location.
|
// Format the event location.
|
||||||
|
|
|
@ -14,6 +14,7 @@ use Friendica\Core\PConfig;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\Item;
|
use Friendica\Model\Item;
|
||||||
|
use Friendica\Model\Term;
|
||||||
use Friendica\Util\DateTimeFormat;
|
use Friendica\Util\DateTimeFormat;
|
||||||
use Friendica\Util\Temporal;
|
use Friendica\Util\Temporal;
|
||||||
|
|
||||||
|
@ -336,13 +337,15 @@ class Post extends BaseObject
|
||||||
unset($buttons["like"]);
|
unset($buttons["like"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$tags = Term::populateTagsFromItem($item);
|
||||||
|
|
||||||
$tmp_item = [
|
$tmp_item = [
|
||||||
'template' => $this->getTemplate(),
|
'template' => $this->getTemplate(),
|
||||||
'type' => implode("", array_slice(explode("/", $item['verb']), -1)),
|
'type' => implode("", array_slice(explode("/", $item['verb']), -1)),
|
||||||
'suppress_tags' => Config::get('system', 'suppress_tags'),
|
'suppress_tags' => Config::get('system', 'suppress_tags'),
|
||||||
'tags' => $item['tags'],
|
'tags' => $tags['tags'],
|
||||||
'hashtags' => $item['hashtags'],
|
'hashtags' => $tags['hashtags'],
|
||||||
'mentions' => $item['mentions'],
|
'mentions' => $tags['mentions'],
|
||||||
'txt_cats' => L10n::t('Categories:'),
|
'txt_cats' => L10n::t('Categories:'),
|
||||||
'txt_folders' => L10n::t('Filed under:'),
|
'txt_folders' => L10n::t('Filed under:'),
|
||||||
'has_cats' => ((count($categories)) ? 'true' : ''),
|
'has_cats' => ((count($categories)) ? 'true' : ''),
|
||||||
|
|
Loading…
Reference in a new issue