mirror of
https://github.com/friendica/friendica
synced 2025-05-11 09:04:11 +02:00
Move System::httpExit to BaseModule->httpExit
- This will ensure headers set in BaseModule->run will be carried in httpExit scenarios - Deprecate httpExit() method in Core\System
This commit is contained in:
parent
94e3dde2e3
commit
da1416c07f
24 changed files with 58 additions and 32 deletions
|
@ -183,7 +183,7 @@ class API extends BaseModule
|
|||
|
||||
if (strcmp($finish, $start) < 0 && !$noFinish) {
|
||||
if ($isPreview) {
|
||||
System::httpExit($this->t('Event can not end before it has started.'));
|
||||
$this->httpExit($this->t('Event can not end before it has started.'));
|
||||
} else {
|
||||
$this->sysMessages->addNotice($this->t('Event can not end before it has started.'));
|
||||
$this->baseUrl->redirect($redirectOnError);
|
||||
|
@ -192,7 +192,7 @@ class API extends BaseModule
|
|||
|
||||
if (empty($summary) || ($start === DBA::NULL_DATETIME)) {
|
||||
if ($isPreview) {
|
||||
System::httpExit($this->t('Event title and start time are required.'));
|
||||
$this->httpExit($this->t('Event title and start time are required.'));
|
||||
} else {
|
||||
$this->sysMessages->addNotice($this->t('Event title and start time are required.'));
|
||||
$this->baseUrl->redirect($redirectOnError);
|
||||
|
@ -251,7 +251,7 @@ class API extends BaseModule
|
|||
];
|
||||
|
||||
if (intval($request['preview'])) {
|
||||
System::httpExit(Event::getHTML($datarray));
|
||||
$this->httpExit(Event::getHTML($datarray));
|
||||
}
|
||||
|
||||
$eventId = Event::store($datarray);
|
||||
|
|
|
@ -81,6 +81,6 @@ class Show extends BaseModule
|
|||
'$event' => $tplEvent,
|
||||
]);
|
||||
|
||||
System::httpExit($o);
|
||||
$this->httpExit($o);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue