|
@@ 328-330 (lines=3) @@
|
| 325 |
|
|
| 326 |
|
// CSRF check |
| 327 |
|
$token = SecurityToken::inst(); |
| 328 |
|
if (empty($vars[$token->getName()]) || !$token->check($vars[$token->getName()])) { |
| 329 |
|
return new HTTPResponse(null, 400); |
| 330 |
|
} |
| 331 |
|
|
| 332 |
|
if (!isset($vars['ids']) || !$vars['ids']) { |
| 333 |
|
return (new HTTPResponse(json_encode(['status' => 'error']), 400)) |
|
@@ 374-376 (lines=3) @@
|
| 371 |
|
|
| 372 |
|
// CSRF check |
| 373 |
|
$token = SecurityToken::inst(); |
| 374 |
|
if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) { |
| 375 |
|
return new HTTPResponse(null, 400); |
| 376 |
|
} |
| 377 |
|
|
| 378 |
|
// Check parent record |
| 379 |
|
/** @var Folder $parentRecord */ |
|
@@ 453-455 (lines=3) @@
|
| 450 |
|
|
| 451 |
|
// CSRF check |
| 452 |
|
$token = SecurityToken::inst(); |
| 453 |
|
if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) { |
| 454 |
|
return new HTTPResponse(null, 400); |
| 455 |
|
} |
| 456 |
|
|
| 457 |
|
// Check parent record |
| 458 |
|
/** @var Folder $parentRecord */ |
|
@@ 617-619 (lines=3) @@
|
| 614 |
|
|
| 615 |
|
// CSRF check |
| 616 |
|
$token = SecurityToken::inst(); |
| 617 |
|
if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) { |
| 618 |
|
return new HTTPResponse(null, 400); |
| 619 |
|
} |
| 620 |
|
|
| 621 |
|
// check addchildren permissions |
| 622 |
|
/** @var Folder $parentRecord */ |