|
@@ 347-349 (lines=3) @@
|
| 344 |
|
|
| 345 |
|
// CSRF check |
| 346 |
|
$token = SecurityToken::inst(); |
| 347 |
|
if (empty($vars[$token->getName()]) || !$token->check($vars[$token->getName()])) { |
| 348 |
|
return new HTTPResponse(null, 400); |
| 349 |
|
} |
| 350 |
|
|
| 351 |
|
if (!isset($vars['ids']) || !$vars['ids']) { |
| 352 |
|
return (new HTTPResponse(json_encode(['status' => 'error']), 400)) |
|
@@ 393-395 (lines=3) @@
|
| 390 |
|
|
| 391 |
|
// CSRF check |
| 392 |
|
$token = SecurityToken::inst(); |
| 393 |
|
if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) { |
| 394 |
|
return new HTTPResponse(null, 400); |
| 395 |
|
} |
| 396 |
|
|
| 397 |
|
// Check parent record |
| 398 |
|
/** @var Folder $parentRecord */ |
|
@@ 472-474 (lines=3) @@
|
| 469 |
|
|
| 470 |
|
// CSRF check |
| 471 |
|
$token = SecurityToken::inst(); |
| 472 |
|
if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) { |
| 473 |
|
return new HTTPResponse(null, 400); |
| 474 |
|
} |
| 475 |
|
|
| 476 |
|
// Check parent record |
| 477 |
|
/** @var Folder $parentRecord */ |
|
@@ 636-638 (lines=3) @@
|
| 633 |
|
|
| 634 |
|
// CSRF check |
| 635 |
|
$token = SecurityToken::inst(); |
| 636 |
|
if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) { |
| 637 |
|
return new HTTPResponse(null, 400); |
| 638 |
|
} |
| 639 |
|
|
| 640 |
|
// check addchildren permissions |
| 641 |
|
/** @var Folder $parentRecord */ |