示例#1
0
function handle_retire_batch($user)
{
    $batch_id = get_int('batch_id');
    $batch = BoincBatch::lookup_id($batch_id);
    if (!$batch) {
        error_page("no such batch");
    }
    check_access($user, $batch);
    retire_batch($batch);
    page_head("Batch retired");
    echo "<p><a href=submit.php>Return to job control page</a>\n";
    page_tail();
}
示例#2
0
function handle_retire_batch($r)
{
    xml_start_tag("retire_batch");
    list($user, $user_submit) = authenticate_user($r, null);
    $batch = get_batch($r);
    if ($batch->user_id != $user->id) {
        xml_error(-1, "not owner");
    }
    retire_batch($batch);
    echo "<success>1</success>\n        </retire_batch>\n    ";
}
function handle_retire_batch($r)
{
    list($user, $user_submit) = authenticate_user($r, null);
    $batch_id = (int) $r->batch_id;
    $batch = BoincBatch::lookup_id($batch_id);
    if ($batch->user_id != $user->id) {
        error("not owner");
    }
    retire_batch($batch);
    echo "<success>1</success>";
}