Example #1
0
/**
 * Selects a mail queue entry from the table and returns the contents.
 *
 * @param   string $id The mail queue entry ID.
 * @return  A string containing the body.
 */
function getMailQueue($id)
{
    if (Auth::getCurrentRole() < User::getRoleID('Developer')) {
        return;
    }
    $res = Mail_Queue::getEntry($id);
    if (!Issue::canAccess($res['maq_iss_id'], $GLOBALS['usr_id'])) {
        return '';
    }
    if (empty($_GET['ec_id'])) {
        return $res['maq_body'];
    }
    return Link_Filter::processText(Auth::getCurrentProject(), nl2br(htmlspecialchars($res['maq_headers'] . "\n" . $res['maq_body'])));
}
/**
 * Selects a mail queue entry from the table and returns the contents.
 * 
 * @param   string $id The mail queue entry ID.
 * @return  A string containing the body.
 */
function getMailQueue($id)
{
    if (Auth::getCurrentRole() < User::getRoleID('Developer')) {
        return;
    }
    $res = Mail_Queue::getEntry($id);
    if (!empty($_GET["ec_id"])) {
        return Link_Filter::processText(Auth::getCurrentProject(), nl2br(htmlspecialchars($_GET["ec_id"] . ":" . $id . ":" . $res["maq_headers"] . "\n" . $res["maq_body"])));
    } else {
        return $res["maq_body"];
    }
}