|
@@ 261-263 (lines=3) @@
|
| 258 |
|
|
| 259 |
|
// CSRF check |
| 260 |
|
$token = SecurityToken::inst(); |
| 261 |
|
if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) { |
| 262 |
|
return new SS_HTTPResponse(null, 400); |
| 263 |
|
} |
| 264 |
|
|
| 265 |
|
if (!isset($data['id']) || !is_numeric($data['id'])) { |
| 266 |
|
return (new SS_HTTPResponse(json_encode(['status' => 'error']), 400)) |
|
@@ 310-312 (lines=3) @@
|
| 307 |
|
|
| 308 |
|
// CSRF check |
| 309 |
|
$token = SecurityToken::inst(); |
| 310 |
|
if (empty($vars[$token->getName()]) || !$token->check($vars[$token->getName()])) { |
| 311 |
|
return new SS_HTTPResponse(null, 400); |
| 312 |
|
} |
| 313 |
|
|
| 314 |
|
if (!isset($vars['ids']) || !$vars['ids']) { |
| 315 |
|
return (new SS_HTTPResponse(json_encode(['status' => 'error']), 400)) |
|
@@ 355-357 (lines=3) @@
|
| 352 |
|
|
| 353 |
|
// CSRF check |
| 354 |
|
$token = SecurityToken::inst(); |
| 355 |
|
if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) { |
| 356 |
|
return new SS_HTTPResponse(null, 400); |
| 357 |
|
} |
| 358 |
|
|
| 359 |
|
// check canAddChildren permissions |
| 360 |
|
if (!empty($data['ParentID']) && is_numeric($data['ParentID'])) { |
|
@@ 416-418 (lines=3) @@
|
| 413 |
|
|
| 414 |
|
// CSRF check |
| 415 |
|
$token = SecurityToken::inst(); |
| 416 |
|
if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) { |
| 417 |
|
return new SS_HTTPResponse(null, 400); |
| 418 |
|
} |
| 419 |
|
|
| 420 |
|
// check addchildren permissions |
| 421 |
|
if (!empty($data['ParentID']) && is_numeric($data['ParentID'])) { |