$patch = ereg_replace("^[^:]*:", "", $disputeinfo["object"]); ?> <br><a href="<?php echo projurl($projectinfo["id"], "post={$post}"); ?> "><?php echo date("M j, Y g:ia", $reqmtschange["time"]); ?> - <?php echo htmlentities($reqmtschange["subject"]); ?> </a> </td></tr> <tr><td valign=top width="0%"><b>Disputed Change:</b></td><td width="100%" colspan=2> <div style="border:1px solid #808080;padding:1em"><?php echo formatDiff($patch); ?> </div> <?php break; } } } } } ?> </td></tr> </table> <?php if ($disputeinfo["status"] === 'conflict' && $disputeinfo["plaintiff"] === $GLOBALS["username"]) { ?>
function formatOutput($command, $output) { if (preg_match("%^(git )?diff%is", $command) || preg_match("%^status.*?-.*?v%is", $command)) { $output = formatDiff($output); } $output = formatHelp($output); return $output; }
function show_body($topicid, $post, $openids = false) { $body = $post["body"]; $diff = ''; if (ereg("^(.*)\n/-/-/-/-/-begin-diff-/-/-/-/-/\n(.*)\$", $body, $args)) { $body = $args[1]; $diff = $args[2]; } $body = linkify(str_replace("\n", "<br />\n", trim(htmlentities($body)))); //check if post has attachments if (sizeof($post['attachments']) > 0) { list($rc, $body) = ff_attachtobody($post['id'], $body); } print $body; if ($diff) { include_once "diff.php"; print "<hr>\n"; print formatDiff($diff); } if (sizeof($post['attachments']) > 0) { print "<br>\n"; print "<b>attachments:</b><br>\n"; list($rc, $err) = ff_listattachments($post['id']); } $subject = $post["subject"]; $subject = ereg_replace("^[rR][eE]:? *", "", $subject); $subject = "Re: {$subject}"; print "<br>\n"; print "<div class=postfooter>"; print "[ <a href=\"javascript:inlinepost('{$topicid}','{$post['id']}','{$topicid}_field{$post['id']}','" . htmlentities(jsencode("Re: " . ereg_replace("^[rR][eE]:? *", "", $post["subject"]))) . "','{$GLOBALS['username']}')\">Reply to This</a> ]"; // If the post status is pending and the lead is viewing, // offer the Accept / Reject options. if ($post['status'] == 'pending') { $projectid = substr($post['topicid'], 6); list($rc, $projinfo) = ff_getprojectinfo($projectid); if ($GLOBALS['username'] == $projinfo['lead'] && $GLOBALS['username'] !== "") { // If a requirements change dispute is deliberating then // the lead can't accept this proposal. list($rc, $disputes) = ff_getprojectdisputes($projectid); if ($rc) { $disputes = array(); } $canaccept = 1; foreach ($disputes as $dispute) { if ($dispute["type"] == 'badchange' && $dispute["status"] == 'deliberating') { $canaccept = 0; break; } } print "[ <a href=\"handlechange.php?project={$projectid}&accept=1&post={$post['id']}\"" . ($canaccept ? "" : " onClick=\"alert('You can\\'t accept requirements changes while a\\nchange dispute is in deliberation. Please try again later.');return false\"") . "> Accept </a> ]"; print "[ <a href=\"handlechange.php?project={$projectid}&accept=0&post={$post['id']}\"> Reject </a> ]"; } } print "</div>"; print "<div id={$topicid}_field{$post['id']}></div>"; print "<div id={$topicid}_attachment{$post['id']} align='right'></div>"; if (sizeof($post["children"])) { print "<div class=postindent>"; show_thread($topicid, $post["children"], 0, $openids); print "</div>\n"; } }