|
@@ 236-238 (lines=3) @@
|
| 233 |
|
|
| 234 |
|
// CSRF check |
| 235 |
|
$token = SecurityToken::inst(); |
| 236 |
|
if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) { |
| 237 |
|
return new SS_HTTPResponse(null, 400); |
| 238 |
|
} |
| 239 |
|
|
| 240 |
|
if (!isset($data['id']) || !is_numeric($data['id'])) { |
| 241 |
|
return (new SS_HTTPResponse(json_encode(['status' => 'error']), 400)) |
|
@@ 285-287 (lines=3) @@
|
| 282 |
|
|
| 283 |
|
// CSRF check |
| 284 |
|
$token = SecurityToken::inst(); |
| 285 |
|
if (empty($vars[$token->getName()]) || !$token->check($vars[$token->getName()])) { |
| 286 |
|
return new SS_HTTPResponse(null, 400); |
| 287 |
|
} |
| 288 |
|
|
| 289 |
|
if (!isset($vars['ids']) || !$vars['ids']) { |
| 290 |
|
return (new SS_HTTPResponse(json_encode(['status' => 'error']), 400)) |
|
@@ 325-327 (lines=3) @@
|
| 322 |
|
|
| 323 |
|
// CSRF check |
| 324 |
|
$token = SecurityToken::inst(); |
| 325 |
|
if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) { |
| 326 |
|
return new SS_HTTPResponse(null, 400); |
| 327 |
|
} |
| 328 |
|
|
| 329 |
|
// check canAddChildren permissions |
| 330 |
|
if (!empty($data['ParentID']) && is_numeric($data['ParentID'])) { |
|
@@ 380-382 (lines=3) @@
|
| 377 |
|
|
| 378 |
|
// CSRF check |
| 379 |
|
$token = SecurityToken::inst(); |
| 380 |
|
if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) { |
| 381 |
|
return new SS_HTTPResponse(null, 400); |
| 382 |
|
} |
| 383 |
|
|
| 384 |
|
// check addchildren permissions |
| 385 |
|
if (!empty($data['ParentID']) && is_numeric($data['ParentID'])) { |