$obsolete = $patches->getObsoletingPatches($bug_id, $name, $revisions[0][0]); $style = !empty($obsolete) ? ' style="background-color: yellow; text-decoration: line-through;" ' : ''; $url_name = urlencode($name); $clean_name = clean($name); $formatted_date = format_date($revisions[0][0]); $submitter = spam_protect($revisions[0][1]); echo <<<OUTPUT <a href="patch-display.php?bug_id={$bug_id}&patch={$url_name}&revision=latest" {$style}>{$clean_name}</a> (last revision {$formatted_date}) by {$submitter}) <br> OUTPUT; } echo "<p><a href='patch-add.php?bug_id={$bug_id}'>Add a Patch</a></p>"; require_once "{$ROOT_DIR}/include/classes/bug_ghpulltracker.php"; $pulltracker = new Bug_Pulltracker(); $pulls = $pulltracker->listPulls($bug_id); echo "<h2>Pull Requests</h2>\n"; require "{$ROOT_DIR}/templates/listpulls.php"; echo "<p><a href='gh-pull-add.php?bug_id={$bug_id}'>Add a Pull Request</a></p>"; } // Display comments $bug_comments = bugs_get_bug_comments($bug_id); if ($show_bug_info && is_array($bug_comments) && count($bug_comments) && $bug['status'] !== 'Spam') { $history_tabs = array('type_all' => 'All', 'type_comment' => 'Comments', 'type_log' => 'Changes', 'type_svn' => 'Git/SVN commits', 'type_related' => 'Related reports'); if (!isset($_COOKIE['history_tab']) || !isset($history_tabs[$_COOKIE['history_tab']])) { $active_history_tab = 'type_all'; } else { $active_history_tab = $_COOKIE['history_tab']; } echo '<h2 style="border-bottom:2px solid #666;margin-bottom:0;padding:5px 0;">History</h2>', "<div id='comment_filter' class='controls comments'>"; foreach ($history_tabs as $id => $label) {
if (!is_valid_email($email, $logged_in)) { $errors[] = 'Email address must be valid!'; } /** * Check if session answer is set, then compare * it with the post captcha value. If it's not * the same, then it's an incorrect password. */ if (!isset($_SESSION['answer']) || $_POST['captcha'] != $_SESSION['answer']) { $errors[] = 'Incorrect Captcha'; } if (count($errors)) { throw new Exception(''); } } catch (Exception $e) { $pulls = $pullinfo->listPulls($bug_id); include "{$ROOT_DIR}/templates/addghpull.php"; exit; } } else { $email = $auth_user->email; } if (!count($errors)) { PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $newpr = $pullinfo->attach($bug_id, $_POST['repository'], $_POST['pull_id'], $email); PEAR::popErrorHandling(); if (PEAR::isError($newpr)) { $errors = array($newpr->getMessage(), 'Could not attach pull request to Bug #' . $bug_id); } } if (count($errors)) {