cvs: pearweb /public_html/bugs bug.php

From: Date: Sun, 22 Apr 2007 03:41:42 +0000
Subject: cvs: pearweb /public_html/bugs bug.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-46088@lists.php.net to get a copy of this message
dufuz Sun Apr 22 03:41:42 2007 UTC Modified files: /pearweb/public_html/bugs bug.php Log: Request #10764 strike-through obsolete patches # Not all that happy with it. # Doing a query for each patch isn't the optimal way but since we don't have many # patch per bug then this should be okey for now http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/bug.php?r1=1.154&r2=1.155&diff_format=u Index: pearweb/public_html/bugs/bug.php diff -u pearweb/public_html/bugs/bug.php:1.154 pearweb/public_html/bugs/bug.php:1.155 --- pearweb/public_html/bugs/bug.php:1.154 Sat Apr 21 21:17:20 2007 +++ pearweb/public_html/bugs/bug.php Sun Apr 22 03:41:42 2007 @@ -15,7 +15,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: bug.php,v 1.154 2007/04/21 21:17:20 davidc Exp $ + * @version $Id: bug.php,v 1.155 2007/04/22 03:41:42 dufuz Exp $ */ /* @@ -249,7 +249,7 @@ // handle any updates, displaying errors if there were any $errors = array(); -if ($_POST['ncomment'] && !isset($_POST['preview']) && $edit == 3) { +if (isset($_POST['ncomment']) && !isset($_POST['preview']) && $edit == 3) { // Submission of additional comment by others /** @@ -336,7 +336,7 @@ } else { $from = ''; } -} elseif ($_POST['ncomment'] && isset($_POST['preview']) && $edit == 3) { +} elseif (isset($_POST['ncomment']) && isset($_POST['preview']) && $edit == 3) { $ncomment = trim($_POST['ncomment']); } elseif ($_POST['in'] && !isset($_POST['preview']) && $edit == 2) { @@ -373,7 +373,7 @@ } else { $from = $bug['email']; } - + if (!empty($_POST['in']['package_name']) && $bug['package_name'] != $_POST['in']['package_name']) { // reset package version if we change package name @@ -488,7 +488,7 @@ // reset package version if we change package name $_POST['in']['package_version'] = ''; } - + $query .= " sdesc='" . escapeSQL($_POST['in']['sdesc']) . "'," . " status='" . escapeSQL($status) . "'," . " package_name='" . escapeSQL($_POST['in']['package_name']) . "'," . @@ -1196,8 +1196,11 @@ ?><h2>Patches</h2> <a href="/bugs/patch-add.php?bug=<?php echo $id ?>">Add a Patch</a><br /><?php foreach ($p as $name => $revisions) { + $obsolete = $patches->getObsoletingPatches($bug['id'], $name, $revisions[0][0]); + $style = !empty($obsolete) ? ' style="background-color: yellow; text-decoration: line-through;" ' : ''; ?><a href="patch-display.php?bug=<?php echo $bug['id'] ?>&patch=<?php - echo urlencode($name) ?>&revision=latest"><?php echo clean($name) ?></a> (last revision <?php echo format_date($revisions[0][0]) ?> by <?php echo $revisions[0][1] ?>)<br /><?php + echo urlencode($name) ?>&revision=latest" <?php echo $style; ?>><?php echo clean($name) ?></a> (last revision <?php echo format_date($revisions[0][0]) ?> by <?php echo $revisions[0][1] ?>)<br /><?php + echo "\n"; } // Display comments $query = 'SELECT c.id,c.email,c.comment,UNIX_TIMESTAMP(c.ts) AS added, c.reporter_name as comment_name, IF(c.handle <> "",u.registered,1) as registered,

« previous php.pear.cvs (#46088) next »