mirror of
https://github.com/friendica/friendica
synced 2024-12-23 08:00:16 +00:00
Merge pull request #11514 from annando/issue-11508
Issue 11508: Sanitizing date fields for events and polls
This commit is contained in:
commit
6f70d21e07
1 changed files with 13 additions and 5 deletions
|
@ -170,7 +170,7 @@ class Processor
|
|||
}
|
||||
|
||||
if (!empty($activity['question']['end-time'])) {
|
||||
$question['end-time'] = $activity['question']['end-time'];
|
||||
$question['end-time'] = DateTimeFormat::utc($activity['question']['end-time']);
|
||||
}
|
||||
|
||||
Post\Question::update($item['uri-id'], $question);
|
||||
|
@ -238,8 +238,12 @@ class Processor
|
|||
$event['edited'] = DateTimeFormat::utc($activity['updated']);
|
||||
$event['summary'] = HTML::toBBCode($activity['name']);
|
||||
$event['desc'] = HTML::toBBCode($activity['content']);
|
||||
$event['start'] = $activity['start-time'];
|
||||
$event['finish'] = $activity['end-time'];
|
||||
if (!empty($activity['start-time'])) {
|
||||
$event['start'] = DateTimeFormat::utc($activity['start-time']);
|
||||
}
|
||||
if (!empty($activity['end-time'])) {
|
||||
$event['finish'] = DateTimeFormat::utc($activity['end-time']);
|
||||
}
|
||||
$event['nofinish'] = empty($event['finish']);
|
||||
$event['location'] = $activity['location'];
|
||||
|
||||
|
@ -558,8 +562,12 @@ class Processor
|
|||
{
|
||||
$event['summary'] = HTML::toBBCode($activity['name'] ?: $activity['summary']);
|
||||
$event['desc'] = HTML::toBBCode($activity['content']);
|
||||
$event['start'] = $activity['start-time'];
|
||||
$event['finish'] = $activity['end-time'];
|
||||
if (!empty($activity['start-time'])) {
|
||||
$event['start'] = DateTimeFormat::utc($activity['start-time']);
|
||||
}
|
||||
if (!empty($activity['end-time'])) {
|
||||
$event['finish'] = DateTimeFormat::utc($activity['end-time']);
|
||||
}
|
||||
$event['nofinish'] = empty($event['finish']);
|
||||
$event['location'] = $activity['location'];
|
||||
$event['cid'] = $item['contact-id'];
|
||||
|
|
Loading…
Reference in a new issue