Beispiel #1
0
}
// space, nbsp
if ($commitb->hash === $Info->grading_hash()) {
    $commitb->subject .= "  ✱";
}
// space, nbsp
$TABWIDTH = $Info->commit_info("tabwidth") ?: 4;
echo "<table><tr><td><h2>diff</h2></td><td style=\"padding-left:10px;line-height:110%\">", "<div class=\"diffl61 gd\" style=\"padding:2px 5px\"><big><code>", substr($hasha, 0, 7), "</code> ", htmlspecialchars($commita->subject), "</big></div>", "<div class=\"diffl61 gi\" style=\"padding:2px 5px\"><big><code>", substr($hashb, 0, 7), "</code> ", htmlspecialchars($commitb->subject), "</big></div>", "</td></tr></table><hr>\n";
// collect diff and sort line notes
$diff = $User->repo_diff($Info->repo, $hashb, $Pset, $diff_options);
$all_linenotes = $hashb_mine ? $Info->commit_info("linenotes") : array();
$lnorder = new LinenotesOrder($all_linenotes, $Info->can_see_grades);
$lnorder->set_diff($diff);
// print line notes
$notelinks = array();
foreach ($lnorder->seq() as $fl) {
    $f = str_starts_with($fl[0], $Pset->directory_slash) ? substr($fl[0], strlen($Pset->directory_slash)) : $fl[0];
    $notelinks[] = '<a href="#L' . $fl[1] . '_' . html_id_encode($fl[0]) . '" onclick="return gotoline61(this)" class="noteref61' . (!$fl[2] && !$Info->user_can_see_grades ? " hiddennote61" : "") . '">' . htmlspecialchars($f) . ':' . substr($fl[1], 1) . '</a>';
}
if (count($notelinks)) {
    ContactView::echo_group("notes", join(", ", $notelinks));
}
// check for any linenotes
$has_any_linenotes = false;
foreach ($diff as $file => $dinfo) {
    if ($lnorder->file($file)) {
        $has_any_linenotes = true;
        break;
    }
}
// line notes