Skip to content

Commit 8cd16fc

Browse files
committed
fixup! feat: add form locking mechanism
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
1 parent 5670ac7 commit 8cd16fc

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

lib/Controller/ApiController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ public function newForm(?int $fromId = null): DataResponse {
189189
unset($formData['state']);
190190
unset($formData['fileId']);
191191
unset($formData['fileFormat']);
192-
unset($formData['locked_by']);
193-
unset($formData['locked_until']);
192+
unset($formData['lockedBy']);
193+
unset($formData['lockedUntil']);
194194
$formData['hash'] = $this->formsService->generateFormHash();
195195
// TRANSLATORS Appendix to the form Title of a duplicated/copied form.
196196
$formData['title'] .= ' - ' . $this->l10n->t('Copy');

lib/Db/Form.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public function __construct() {
8484
$this->addType('showExpiration', 'boolean');
8585
$this->addType('lastUpdated', 'integer');
8686
$this->addType('state', 'integer');
87-
$this->addType('locked_by', 'string');
88-
$this->addType('locked_until', 'integer');
87+
$this->addType('lockedBy', 'string');
88+
$this->addType('lockedUntil', 'integer');
8989
}
9090

9191
// JSON-Decoding of access-column.
@@ -157,8 +157,8 @@ public function setAccess(array $access): void {
157157
* lastUpdated: int,
158158
* submissionMessage: ?string,
159159
* state: 0|1|2,
160-
* locked_by: ?string,
161-
* locked_until: ?int,
160+
* lockedBy: ?string,
161+
* lockedUntil: ?int,
162162
* }
163163
*/
164164
public function read() {
@@ -180,8 +180,8 @@ public function read() {
180180
'lastUpdated' => (int)$this->getLastUpdated(),
181181
'submissionMessage' => $this->getSubmissionMessage(),
182182
'state' => $this->getState(),
183-
'locked_by' => $this->getLockedBy(),
184-
'locked_until' => $this->getLockedUntil(),
183+
'lockedBy' => $this->getLockedBy(),
184+
'lockedUntil' => $this->getLockedUntil(),
185185
];
186186
}
187187
}

0 commit comments

Comments
 (0)