equal
deleted
inserted
replaced
396 echo $diff; |
396 echo $diff; |
397 |
397 |
398 break; |
398 break; |
399 case "protect": |
399 case "protect": |
400 // echo PageUtils::protect($paths->page_id, $paths->namespace, (int)$_POST['level'], $_POST['reason']); |
400 // echo PageUtils::protect($paths->page_id, $paths->namespace, (int)$_POST['level'], $_POST['reason']); |
|
401 |
|
402 if ( @$_POST['reason'] === '__ROLLBACK__' ) |
|
403 { |
|
404 // __ROLLBACK__ is a keyword for log entries. |
|
405 die('"__ROLLBACK__" ain\'t gonna do it, buddy. Try to _not_ use reserved keywords next time, ok?'); |
|
406 } |
|
407 |
401 $page = new PageProcessor($paths->page_id, $paths->namespace); |
408 $page = new PageProcessor($paths->page_id, $paths->namespace); |
402 header('Content-type: application/json'); |
409 header('Content-type: application/json'); |
403 |
410 |
404 $result = $page->protect_page(intval($_POST['level']), $_POST['reason']); |
411 $result = $page->protect_page(intval($_POST['level']), $_POST['reason']); |
405 echo enano_json_encode($result); |
412 echo enano_json_encode($result); |