$f_rev_id = gpc_get_int('rev_id', 0);
$t_title = '';
if ($f_bug_id) {
    $t_bug_id = $f_bug_id;
    $t_bug_data = bug_get($t_bug_id, true);
    $t_bug_revisions = array_reverse(bug_revision_list($t_bug_id), true);
    $t_title = lang_get('issue_id') . $t_bug_id;
} else {
    if ($f_bugnote_id) {
        $t_bug_id = bugnote_get_field($f_bugnote_id, 'bug_id');
        $t_bug_data = bug_get($t_bug_id, true);
        $t_bug_revisions = bug_revision_list($t_bug_id, REV_ANY, $f_bugnote_id);
        $t_title = lang_get('bugnote') . ' ' . $f_bugnote_id;
    } else {
        if ($f_rev_id) {
            $t_bug_revisions = bug_revision_like($f_rev_id);
            if (count($t_bug_revisions) < 1) {
                trigger_error(ERROR_GENERIC, ERROR);
            }
            $t_bug_id = $t_bug_revisions[$f_rev_id]['bug_id'];
            $t_bug_data = bug_get($t_bug_id, true);
            $t_title = lang_get('issue_id') . $t_bug_id;
        } else {
            trigger_error(ERROR_GENERIC, ERROR);
        }
    }
}
function show_revision($t_revision)
{
    static $s_can_drop = null;
    static $s_drop_token = null;
Example #2
0
$f_rev_id = gpc_get_int('rev_id', 0);
$t_title = '';
if ($f_bug_id) {
    $t_bug_id = $f_bug_id;
    $t_bug_data = bug_get($t_bug_id, true);
    $t_bug_revisions = array_reverse(bug_revision_list($t_bug_id), true);
    $t_title = lang_get('issue_id') . $t_bug_id;
} else {
    if ($f_bugnote_id) {
        $t_bug_id = bugnote_get_field($f_bugnote_id, 'bug_id');
        $t_bug_data = bug_get($t_bug_id, true);
        $t_bug_revisions = array_reverse(bug_revision_list($t_bug_id, REV_ANY, $f_bugnote_id), true);
        $t_title = lang_get('bugnote') . ' ' . $f_bugnote_id;
    } else {
        if ($f_rev_id) {
            $t_bug_revisions = array_reverse(bug_revision_like($f_rev_id), true);
            if (count($t_bug_revisions) < 1) {
                trigger_error(ERROR_GENERIC, ERROR);
            }
            $t_bug_id = $t_bug_revisions[$f_rev_id]['bug_id'];
            $t_bug_data = bug_get($t_bug_id, true);
            $t_title = lang_get('issue_id') . $t_bug_id;
        } else {
            trigger_error(ERROR_GENERIC, ERROR);
        }
    }
}
function show_revision($t_revision)
{
    static $s_can_drop = null;
    static $s_drop_token = null;