Update deps; minor tweaks
This commit is contained in:
1 parent
ff34bb9743
commit
9110643383
4 files changed
+42
-41
No files matched your search
@@ -29,15 +29,15 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
||||
$req = Request::byId($_PATCH['requestId'])->getOrCall(not_found(...));
|
||||
$patch = [];
|
||||
// update recurrence if changed
|
||||
if ($recurrence != $req->recurrence) {
|
||||
if ($recurrence !== $req->recurrence) {
|
||||
$patch['recurrence'] = $recurrence;
|
||||
if ($recurrence->period == RecurrencePeriod::Immediate) {
|
||||
if ($recurrence->period === RecurrencePeriod::Immediate) {
|
||||
RemoveFields::byId(Table::REQUEST, $req->id, ['showAfter']);
|
||||
}
|
||||
}
|
||||
// append history
|
||||
$upd8Text = trim($_PATCH['requestText']);
|
||||
$text = $upd8Text == '' || $upd8Text == $req->currentText() ? null : $upd8Text;
|
||||
$text = empty($upd8Text) || $upd8Text === $req->currentText() ? null : $upd8Text;
|
||||
array_unshift($req->history, new History($now->format('c'), RequestAction::from($_PATCH['status']), $text));
|
||||
$patch['history'] = $req->history;
|
||||
Patch::byId(Table::REQUEST, $req->id, $patch);
|
||||
|
||||
Reference in new issue
Block a user