<?php
/**
 * Ajax called script to unmark a page 'ready for review'
 * @author Rihards Siliņš
 * @version 1 25/11/2015
 */
$cms_root_path = "../../../";
require_once($cms_root_path."includes/compatibility_includer.php");

$page = new Page();
$page->get($_POST['page_id']);
if (empty($page->id)) {
    die("page not found");
}

$comment = null;
if (isset($_POST['comment'])) {
    $comment = $_POST['comment'];
}

if ($page->setReviewStatus(1, $comment)) {
    die("true");
} else {
    die("false");
}
