function errorMsgExit($msg) { confHeader(); $msg && Conf::msg_error($msg); Conf::$g->footer(); exit; }
function errorMsgExit($msg) { global $Conf; if (@$_REQUEST["ajax"]) { Conf::msg_error($msg); $Conf->ajaxExit(array("ok" => false)); } else { confHeader(); $Conf->footerScript("shortcut().add()"); $msg && Conf::msg_error($msg); Conf::$g->footer(); exit; } }
function refuseReview() { global $Conf, $Opt, $Me, $prow, $paperTable; Dbl::qe_raw("lock tables PaperReview write, PaperReviewRefused write"); $rrow = $paperTable->editrrow; $hadToken = defval($rrow, "reviewToken", 0) != 0; $result = Dbl::qe("delete from PaperReview where reviewId={$rrow->reviewId}"); if (!$result) { return; } $reason = defval($_REQUEST, "reason", ""); if ($reason == "Optional explanation") { $reason = ""; } $result = Dbl::qe("insert into PaperReviewRefused set paperId={$rrow->paperId}, contactId={$rrow->contactId}, requestedBy={$rrow->requestedBy}, reason=?", trim($reason)); if (!$result) { return; } // now the requester must potentially complete their review if ($rrow->reviewType < REVIEW_SECONDARY && $rrow->requestedBy > 0) { Contact::update_review_delegation($rrow->paperId, $rrow->requestedBy, -1); } Dbl::qe_raw("unlock tables"); // send confirmation email $Requester = Contact::find_by_id($rrow->requestedBy); $reqprow = $Conf->paperRow($prow->paperId, $rrow->requestedBy); HotCRPMailer::send_to($Requester, "@refusereviewrequest", $reqprow, array("reviewer_contact" => $rrow, "reason" => $reason)); // confirmation message $Conf->confirmMsg("The request that you review paper #{$prow->paperId} has been removed. Mail was sent to the person who originally requested the review."); if ($hadToken) { $Conf->update_rev_tokens_setting(true); } $prow = null; confHeader(); $Conf->footer(); exit; }