Example #1
0
$u = FbAuth::requireAuthenticate(true, true);
//### This must change later to true and take vcare to pass the cookie
if (!$u) {
    error('Not logged in: Try to refresh the page');
}
//In order to debug XML add "?T3ST=1" in the URL
if (isset($_REQUEST[$debug_parameter])) {
    $XML_debug = true;
}
$a = isset($_REQUEST['a']) ? intval($_REQUEST['a']) : '0';
//$u = isset($_REQUEST['u']) ? $_REQUEST['u'] : '0';
if (isset($_REQUEST['mine'])) {
    $col = 'its_mine';
    $value = !!$_REQUEST['mine'];
    //###Should claiming an article means also automatically follow it?
    Controller::a_claim($u, $a);
} elseif (isset($_REQUEST['delete'])) {
    $col = 'deleted';
    $value = !!$_REQUEST['delete'];
} elseif (isset($_REQUEST['readlater'])) {
    $col = 'read_later';
    $value = !!$_REQUEST['readlater'];
} elseif (isset($_REQUEST['follow'])) {
    $col = 'followed';
    $value = !!$_REQUEST['follow'];
    Controller::a_follow($u, $a);
} elseif (isset($_REQUEST['read'])) {
    $col = 'pdfread';
    //### it may be necessary to sanitize the input.. but prepare/execute may not need it
    //### it may be necessary to decide if adding just one to the field.
    $value = $_REQUEST['read'];