cvs: pearweb /include/bugs pear-bugs.php /public_html account-info.php /public_html/bugs bug.php patch-add.php patch-display.php
/public_html/bugs/include patchtracker.inc /sql bugs.sql pearweb_mdb2schema.xml /templates/bugs listpatches.php patchdisplay.php
| From: | Greg Beaver | Date: | Sun, 25 Feb 2007 19:14:12 +0000 |
| Subject: | cvs: pearweb /include/bugs pear-bugs.php /public_html account-info.php /public_html/bugs bug.php patch-add.php patch-display.php /public_html/bugs/include patchtracker.inc /sql bugs.sql pearweb_mdb2schema.xml /templates/bugs listpatches.php patchdisplay.php |
||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-44876@lists.php.net to get a copy of this message | ||
cellog Sun Feb 25 19:14:12 2007 UTC
Modified files:
/pearweb/include/bugs pear-bugs.php
/pearweb/public_html account-info.php
/pearweb/public_html/bugs bug.php patch-add.php patch-display.php
/pearweb/public_html/bugs/include patchtracker.inc
/pearweb/sql bugs.sql pearweb_mdb2schema.xml
/pearweb/templates/bugs listpatches.php patchdisplay.php
Log:
enhance patch tracking, add submit link to bug display, add developer who created the patch to the
tracker
http://cvs.php.net/viewvc.cgi/pearweb/include/bugs/pear-bugs.php?r1=1.6&r2=1.7&diff_format=u Index: pearweb/include/bugs/pear-bugs.php diff -u pearweb/include/bugs/pear-bugs.php:1.6 pearweb/include/bugs/pear-bugs.php:1.7 --- pearweb/include/bugs/pear-bugs.php:1.6 Sat Feb 10 20:14:16 2007 +++ pearweb/include/bugs/pear-bugs.php Sun Feb 25 19:14:11 2007 @@ -98,6 +98,10 @@ b.status = "Closed" GROUP BY u.handle ORDER BY c DESC, b.ts2 DESC', array(), DB_FETCHMODE_ASSOC); + $patches = $this->_dbh->getOne('SELECT COUNT(*) + FROM bugdb_patchtracker + WHERE + developer=?', array($handle)); $rank = count($bugrank); $alltimecount = 0; foreach ($bugrank as $i => $inf) { @@ -116,6 +120,7 @@ 'rankings' => $bugrank, 'rank' => $rank, 'alltime' => $alltimecount, + 'patches' => $patches, ); } http://cvs.php.net/viewvc.cgi/pearweb/public_html/account-info.php?r1=1.48&r2=1.49&diff_format=u Index: pearweb/public_html/account-info.php diff -u pearweb/public_html/account-info.php:1.48 pearweb/public_html/account-info.php:1.49 --- pearweb/public_html/account-info.php:1.48 Sat Jan 13 12:51:49 2007 +++ pearweb/public_html/account-info.php Sun Feb 25 19:14:11 2007 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: account-info.php,v 1.48 2007/01/13 12:51:49 mj Exp $ + $Id: account-info.php,v 1.49 2007/02/25 19:14:11 cellog Exp $ */ /** @@ -177,6 +177,8 @@ echo '<li>Number of open bugs: <strong>' . $info['opencount'] . '</strong></li>'; echo '<li>Assigned bugs relative to all maintained packages\' bugs: <strong>' . round($info['assigned'] * 100) . '%</strong></li>'; +echo '<li>Number of submitted patches: <strong>' . + $info['patches'] . '</strong></li>'; echo '</ul></li>'; ?> http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/bug.php?r1=1.114&r2=1.115&diff_format=u Index: pearweb/public_html/bugs/bug.php diff -u pearweb/public_html/bugs/bug.php:1.114 pearweb/public_html/bugs/bug.php:1.115 --- pearweb/public_html/bugs/bug.php:1.114 Sun Feb 25 07:06:52 2007 +++ pearweb/public_html/bugs/bug.php Sun Feb 25 19:14:11 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.114 2007/02/25 07:06:52 cellog Exp $ + * @version $Id: bug.php,v 1.115 2007/02/25 19:14:11 cellog Exp $ */ /* @@ -77,7 +77,7 @@ } if ($edit == 1) { - auth_require('pear.dev'); + auth_require('pear.bug', 'pear.dev'); } if (!empty($_POST['pw'])) { @@ -832,8 +832,11 @@ ?> </td> </tr> + <tr> </table> - + <div class="explain"> + <h1><a href="/bugs/patch-add.php?bug=<?php echo $id ?>">Click Here to Submit a Patch</a></h1> + </div> <p style="margin-bottom: 0em"> <label for="ncomment" accesskey="m"><b>New<?php if ($edit==1) echo "/Additional"?> Co<span class="accesskey">m</span>ment:</b></label> </p> @@ -853,6 +856,9 @@ ?> <div class="explain"> + <h1><a href="/bugs/patch-add.php?bug=<?php echo $id ?>">Click Here to Submit a Patch</a></h1> +</div> +<div class="explain"> <form name="subscribetobug" action="/bugs/bug.php?id=<?php echo $id; ?>" method="post"> <table> @@ -1014,12 +1020,15 @@ require 'include/patchtracker.inc'; $patches = new Bug_Patchtracker; $p = $patches->listPatches($id); -if (count($p)) { +if (count($p) || $edit == 1) { ?><h2>Patches</h2><?php + if ($edit == 1) { + ?><a href="/bugs/patch-add.php?bug=<?php echo $id ?>">Add a Patch</a><br /><?php + } } foreach ($p as $name => $revisions) { ?><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 date('Y-m-d H:i:s', $revisions[0]) ?>)<br /><?php + echo urlencode($name) ?>&revision=latest"><?php echo clean($name) ?></a> (last revision <?php echo date('Y-m-d H:i:s', $revisions[0][0]) ?> by <?php echo $revisions[0][1] ?>)<br /><?php } // Display comments $query = 'SELECT c.id,c.email,c.comment,UNIX_TIMESTAMP(c.ts) AS added, c.reporter_name as comment_name, http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/patch-add.php?r1=1.1&r2=1.2&diff_format=u Index: pearweb/public_html/bugs/patch-add.php diff -u pearweb/public_html/bugs/patch-add.php:1.1 pearweb/public_html/bugs/patch-add.php:1.2 --- pearweb/public_html/bugs/patch-add.php:1.1 Sun Feb 25 07:06:52 2007 +++ pearweb/public_html/bugs/patch-add.php Sun Feb 25 19:14:11 2007 @@ -69,7 +69,7 @@ $errors = array(); $package = $buginfo['package_name']; $bug = $buginfo['id']; -$name = ''; +$name = isset($_GET['patch']) ? $_GET['patch'] : ''; $patches = $patchinfo->listPatches($bug); include dirname(dirname(dirname(__FILE__))) . '/templates/bugs/addpatch.php'; ?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/patch-display.php?r1=1.1&r2=1.2&diff_format=u Index: pearweb/public_html/bugs/patch-display.php diff -u pearweb/public_html/bugs/patch-display.php:1.1 pearweb/public_html/bugs/patch-display.php:1.2 --- pearweb/public_html/bugs/patch-display.php:1.1 Sun Feb 25 07:06:52 2007 +++ pearweb/public_html/bugs/patch-display.php Sun Feb 25 19:14:11 2007 @@ -35,9 +35,16 @@ echo readfile($path); exit; } - $patchcontents = file_get_contents($path); + $patchcontents = $patchinfo->getPatch($buginfo['id'], $_GET['patch'], $_GET['revision']); + if (PEAR::isError($patchcontents)) { + response_header('Error :: Cannot retrieve patch'); + display_bug_error('Internal error: Invalid patch/revision specified (is in database, but not in filesystem)'); + response_footer(); + exit; + } $package = $buginfo['package_name']; $bug = $buginfo['id']; + $handle = $patchinfo->getDeveloper($bug, $_GET['patch'], $_GET['revision']); $revision = $_GET['revision']; $patch = $_GET['patch']; include dirname(dirname(dirname(__FILE__))) . '/templates/bugs/patchdisplay.php'; http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/include/patchtracker.inc?r1=1.1&r2=1.2&diff_format=u Index: pearweb/public_html/bugs/include/patchtracker.inc diff -u pearweb/public_html/bugs/include/patchtracker.inc:1.1 pearweb/public_html/bugs/include/patchtracker.inc:1.2 --- pearweb/public_html/bugs/include/patchtracker.inc:1.1 Sun Feb 25 07:06:52 2007 +++ pearweb/public_html/bugs/include/patchtracker.inc Sun Feb 25 19:14:12 2007 @@ -192,7 +192,7 @@ */ function getPatch($bugid, $name, $revision) { - if ($this->_dbh->getOne('SELECT bugid FROM bugdb_patchtracker + if ($this->_dbh->getOne('SELECT bugdb_id FROM bugdb_patchtracker WHERE bugdb_id = ? AND patch = ? AND revision = ?', array($bugid, $name, $revision))) { $contents = @file_get_contents($this->getPatchFullpath($bugid, $name, $revision)); @@ -215,7 +215,7 @@ function listPatches($bugid) { return $this->_dbh->getAssoc( - 'SELECT patch, revision FROM bugdb_patchtracker WHERE bugdb_id = ? + 'SELECT patch, revision, developer FROM bugdb_patchtracker WHERE bugdb_id = ? ORDER BY revision DESC', false, array($bugid), DB_FETCHMODE_ORDERED, true @@ -240,6 +240,29 @@ } /** + * Retrieve the developer who uploaded this patch + * + * @param int $bugid + * @param string $patch + * @param int $revision + * @return string|array array if no revision is selected + */ + function getDeveloper($bugid, $patch, $revision = false) + { + if ($revision) { + return $this->_dbh->getOne( + 'SELECT developer FROM bugdb_patchtracker + WHERE bugdb_id=? AND patch=? AND revision=? + ', array($bugid, $patch, $revision)); + } + return $this->_dbh->getAll( + 'SELECT developer,revision FROM bugdb_patchtracker + WHERE bugdb_id=? AND patch=? ORDER BY revision DESC', + array($bugid, $patch), DB_FETCHMODE_ASSOC + ); + } + + /** * Retrieve information on a bug * * @param int $bugid http://cvs.php.net/viewvc.cgi/pearweb/sql/bugs.sql?r1=1.13&r2=1.14&diff_format=u Index: pearweb/sql/bugs.sql diff -u pearweb/sql/bugs.sql:1.13 pearweb/sql/bugs.sql:1.14 --- pearweb/sql/bugs.sql:1.13 Sun Feb 25 07:06:52 2007 +++ pearweb/sql/bugs.sql Sun Feb 25 19:14:12 2007 @@ -81,5 +81,6 @@ bugdb_id int(8) NOT NULL, patch varchar(40) NOT NULL, revision int(8) NOT NULL, + developer varchar(20) NOT NULL, PRIMARY KEY (bugdb_id, patch, revision) ); \ No newline at end of file http://cvs.php.net/viewvc.cgi/pearweb/sql/pearweb_mdb2schema.xml?r1=1.21&r2=1.22&diff_format=u Index: pearweb/sql/pearweb_mdb2schema.xml diff -u pearweb/sql/pearweb_mdb2schema.xml:1.21 pearweb/sql/pearweb_mdb2schema.xml:1.22 --- pearweb/sql/pearweb_mdb2schema.xml:1.21 Sun Feb 25 07:06:52 2007 +++ pearweb/sql/pearweb_mdb2schema.xml Sun Feb 25 19:14:12 2007 @@ -513,6 +513,12 @@ <length>8</length> <notnull>true</notnull> </field> + <field> + <name>developer</name> + <type>text</type> + <length>20</length> + <notnull>true</notnull> + </field> <index> <name>primary</name> <primary>true</primary> http://cvs.php.net/viewvc.cgi/pearweb/templates/bugs/listpatches.php?r1=1.1&r2=1.2&diff_format=u Index: pearweb/templates/bugs/listpatches.php diff -u pearweb/templates/bugs/listpatches.php:1.1 pearweb/templates/bugs/listpatches.php:1.2 --- pearweb/templates/bugs/listpatches.php:1.1 Sun Feb 25 07:06:52 2007 +++ pearweb/templates/bugs/listpatches.php Sun Feb 25 19:14:12 2007 @@ -1,3 +1,4 @@ +<div class="explain"> <table> <tr> <td> @@ -16,20 +17,19 @@ foreach ($patches as $patch => $revisions): ?> <tr> - <th class="form-label_left"> + <th class="details"> Patch <a href="?bug=<?php echo urlencode($bug) ?>&patch=<?php echo urlencode($patch) - ?>&revision=latest&display=1"><?php echo clean($patch); ?></a> + ?>"><?php echo clean($patch); ?></a> </th> <td> - Patch Versions: <a href="?bug=<?php echo urlencode($bug) ?>&patch=<?php echo urlencode($patch) - ?>&revision=latest&display=1">latest</a> <?php foreach ($revisions as $revision): ?> - <a href="?bug=<?php echo urlencode($bug) ?>&patch=<?php echo urlencode($patch) - ?>&revision=<?php echo $revision ?>&display=1"><?php echo date('Y-m-d H:i:s', $revision) ?></a> + revision <a href="patch-display.php?bug=<?php echo urlencode($bug) ?>&patch=<?php echo urlencode($patch) + ?>&revision=<?php echo $revision[0] ?>&display=1"><?php echo date('Y-m-d H:i:s', $revision[0]) ?></a> by <a href="/user/<?php echo $revision[1] ?>"><?php echo $revision[1] ?></a><br /> <?php endforeach; //foreach ($revisions as $revision) ?> </td> </tr> <?php endforeach; //foreach ($patches as $name => $revisions) endif; //if (!count($patches)) ?> -</table> \ No newline at end of file +</table> +</div> \ No newline at end of file http://cvs.php.net/viewvc.cgi/pearweb/templates/bugs/patchdisplay.php?r1=1.1&r2=1.2&diff_format=u Index: pearweb/templates/bugs/patchdisplay.php diff -u pearweb/templates/bugs/patchdisplay.php:1.1 pearweb/templates/bugs/patchdisplay.php:1.2 --- pearweb/templates/bugs/patchdisplay.php:1.1 Sun Feb 25 07:06:52 2007 +++ pearweb/templates/bugs/patchdisplay.php Sun Feb 25 19:14:12 2007 @@ -10,6 +10,7 @@ echo urlencode($patch) ?>&revision=<?php echo urlencode($revision[0]) ?>"><?php echo date('Y-m-d H:i:s', $revision[0]) ?></a><?php if ($i < count($revisions) - 1) echo ' | '; ?> <?php endforeach; //foreach ($revisions as $i => $revision) ?> +<h3>Developer: <a href="/user/<?php echo $handle ?>"><?php echo $handle ?></a></h3> <pre> <?php echo $patchcontents ?> </pre>
http://cvs.php.net/viewvc.cgi/pearweb/include/bugs/pear-bugs.php?r1=1.6&r2=1.7&diff_format=u Index: pearweb/include/bugs/pear-bugs.php diff -u pearweb/include/bugs/pear-bugs.php:1.6 pearweb/include/bugs/pear-bugs.php:1.7 --- pearweb/include/bugs/pear-bugs.php:1.6 Sat Feb 10 20:14:16 2007 +++ pearweb/include/bugs/pear-bugs.php Sun Feb 25 19:14:11 2007 @@ -98,6 +98,10 @@ b.status = "Closed" GROUP BY u.handle ORDER BY c DESC, b.ts2 DESC', array(), DB_FETCHMODE_ASSOC); + $patches = $this->_dbh->getOne('SELECT COUNT(*) + FROM bugdb_patchtracker + WHERE + developer=?', array($handle)); $rank = count($bugrank); $alltimecount = 0; foreach ($bugrank as $i => $inf) { @@ -116,6 +120,7 @@ 'rankings' => $bugrank, 'rank' => $rank, 'alltime' => $alltimecount, + 'patches' => $patches, ); } http://cvs.php.net/viewvc.cgi/pearweb/public_html/account-info.php?r1=1.48&r2=1.49&diff_format=u Index: pearweb/public_html/account-info.php diff -u pearweb/public_html/account-info.php:1.48 pearweb/public_html/account-info.php:1.49 --- pearweb/public_html/account-info.php:1.48 Sat Jan 13 12:51:49 2007 +++ pearweb/public_html/account-info.php Sun Feb 25 19:14:11 2007 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: account-info.php,v 1.48 2007/01/13 12:51:49 mj Exp $ + $Id: account-info.php,v 1.49 2007/02/25 19:14:11 cellog Exp $ */ /** @@ -177,6 +177,8 @@ echo '<li>Number of open bugs: <strong>' . $info['opencount'] . '</strong></li>'; echo '<li>Assigned bugs relative to all maintained packages\' bugs: <strong>' . round($info['assigned'] * 100) . '%</strong></li>'; +echo '<li>Number of submitted patches: <strong>' . + $info['patches'] . '</strong></li>'; echo '</ul></li>'; ?> http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/bug.php?r1=1.114&r2=1.115&diff_format=u Index: pearweb/public_html/bugs/bug.php diff -u pearweb/public_html/bugs/bug.php:1.114 pearweb/public_html/bugs/bug.php:1.115 --- pearweb/public_html/bugs/bug.php:1.114 Sun Feb 25 07:06:52 2007 +++ pearweb/public_html/bugs/bug.php Sun Feb 25 19:14:11 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.114 2007/02/25 07:06:52 cellog Exp $ + * @version $Id: bug.php,v 1.115 2007/02/25 19:14:11 cellog Exp $ */ /* @@ -77,7 +77,7 @@ } if ($edit == 1) { - auth_require('pear.dev'); + auth_require('pear.bug', 'pear.dev'); } if (!empty($_POST['pw'])) { @@ -832,8 +832,11 @@ ?> </td> </tr> + <tr> </table> - + <div class="explain"> + <h1><a href="/bugs/patch-add.php?bug=<?php echo $id ?>">Click Here to Submit a Patch</a></h1> + </div> <p style="margin-bottom: 0em"> <label for="ncomment" accesskey="m"><b>New<?php if ($edit==1) echo "/Additional"?> Co<span class="accesskey">m</span>ment:</b></label> </p> @@ -853,6 +856,9 @@ ?> <div class="explain"> + <h1><a href="/bugs/patch-add.php?bug=<?php echo $id ?>">Click Here to Submit a Patch</a></h1> +</div> +<div class="explain"> <form name="subscribetobug" action="/bugs/bug.php?id=<?php echo $id; ?>" method="post"> <table> @@ -1014,12 +1020,15 @@ require 'include/patchtracker.inc'; $patches = new Bug_Patchtracker; $p = $patches->listPatches($id); -if (count($p)) { +if (count($p) || $edit == 1) { ?><h2>Patches</h2><?php + if ($edit == 1) { + ?><a href="/bugs/patch-add.php?bug=<?php echo $id ?>">Add a Patch</a><br /><?php + } } foreach ($p as $name => $revisions) { ?><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 date('Y-m-d H:i:s', $revisions[0]) ?>)<br /><?php + echo urlencode($name) ?>&revision=latest"><?php echo clean($name) ?></a> (last revision <?php echo date('Y-m-d H:i:s', $revisions[0][0]) ?> by <?php echo $revisions[0][1] ?>)<br /><?php } // Display comments $query = 'SELECT c.id,c.email,c.comment,UNIX_TIMESTAMP(c.ts) AS added, c.reporter_name as comment_name, http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/patch-add.php?r1=1.1&r2=1.2&diff_format=u Index: pearweb/public_html/bugs/patch-add.php diff -u pearweb/public_html/bugs/patch-add.php:1.1 pearweb/public_html/bugs/patch-add.php:1.2 --- pearweb/public_html/bugs/patch-add.php:1.1 Sun Feb 25 07:06:52 2007 +++ pearweb/public_html/bugs/patch-add.php Sun Feb 25 19:14:11 2007 @@ -69,7 +69,7 @@ $errors = array(); $package = $buginfo['package_name']; $bug = $buginfo['id']; -$name = ''; +$name = isset($_GET['patch']) ? $_GET['patch'] : ''; $patches = $patchinfo->listPatches($bug); include dirname(dirname(dirname(__FILE__))) . '/templates/bugs/addpatch.php'; ?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/patch-display.php?r1=1.1&r2=1.2&diff_format=u Index: pearweb/public_html/bugs/patch-display.php diff -u pearweb/public_html/bugs/patch-display.php:1.1 pearweb/public_html/bugs/patch-display.php:1.2 --- pearweb/public_html/bugs/patch-display.php:1.1 Sun Feb 25 07:06:52 2007 +++ pearweb/public_html/bugs/patch-display.php Sun Feb 25 19:14:11 2007 @@ -35,9 +35,16 @@ echo readfile($path); exit; } - $patchcontents = file_get_contents($path); + $patchcontents = $patchinfo->getPatch($buginfo['id'], $_GET['patch'], $_GET['revision']); + if (PEAR::isError($patchcontents)) { + response_header('Error :: Cannot retrieve patch'); + display_bug_error('Internal error: Invalid patch/revision specified (is in database, but not in filesystem)'); + response_footer(); + exit; + } $package = $buginfo['package_name']; $bug = $buginfo['id']; + $handle = $patchinfo->getDeveloper($bug, $_GET['patch'], $_GET['revision']); $revision = $_GET['revision']; $patch = $_GET['patch']; include dirname(dirname(dirname(__FILE__))) . '/templates/bugs/patchdisplay.php'; http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/include/patchtracker.inc?r1=1.1&r2=1.2&diff_format=u Index: pearweb/public_html/bugs/include/patchtracker.inc diff -u pearweb/public_html/bugs/include/patchtracker.inc:1.1 pearweb/public_html/bugs/include/patchtracker.inc:1.2 --- pearweb/public_html/bugs/include/patchtracker.inc:1.1 Sun Feb 25 07:06:52 2007 +++ pearweb/public_html/bugs/include/patchtracker.inc Sun Feb 25 19:14:12 2007 @@ -192,7 +192,7 @@ */ function getPatch($bugid, $name, $revision) { - if ($this->_dbh->getOne('SELECT bugid FROM bugdb_patchtracker + if ($this->_dbh->getOne('SELECT bugdb_id FROM bugdb_patchtracker WHERE bugdb_id = ? AND patch = ? AND revision = ?', array($bugid, $name, $revision))) { $contents = @file_get_contents($this->getPatchFullpath($bugid, $name, $revision)); @@ -215,7 +215,7 @@ function listPatches($bugid) { return $this->_dbh->getAssoc( - 'SELECT patch, revision FROM bugdb_patchtracker WHERE bugdb_id = ? + 'SELECT patch, revision, developer FROM bugdb_patchtracker WHERE bugdb_id = ? ORDER BY revision DESC', false, array($bugid), DB_FETCHMODE_ORDERED, true @@ -240,6 +240,29 @@ } /** + * Retrieve the developer who uploaded this patch + * + * @param int $bugid + * @param string $patch + * @param int $revision + * @return string|array array if no revision is selected + */ + function getDeveloper($bugid, $patch, $revision = false) + { + if ($revision) { + return $this->_dbh->getOne( + 'SELECT developer FROM bugdb_patchtracker + WHERE bugdb_id=? AND patch=? AND revision=? + ', array($bugid, $patch, $revision)); + } + return $this->_dbh->getAll( + 'SELECT developer,revision FROM bugdb_patchtracker + WHERE bugdb_id=? AND patch=? ORDER BY revision DESC', + array($bugid, $patch), DB_FETCHMODE_ASSOC + ); + } + + /** * Retrieve information on a bug * * @param int $bugid http://cvs.php.net/viewvc.cgi/pearweb/sql/bugs.sql?r1=1.13&r2=1.14&diff_format=u Index: pearweb/sql/bugs.sql diff -u pearweb/sql/bugs.sql:1.13 pearweb/sql/bugs.sql:1.14 --- pearweb/sql/bugs.sql:1.13 Sun Feb 25 07:06:52 2007 +++ pearweb/sql/bugs.sql Sun Feb 25 19:14:12 2007 @@ -81,5 +81,6 @@ bugdb_id int(8) NOT NULL, patch varchar(40) NOT NULL, revision int(8) NOT NULL, + developer varchar(20) NOT NULL, PRIMARY KEY (bugdb_id, patch, revision) ); \ No newline at end of file http://cvs.php.net/viewvc.cgi/pearweb/sql/pearweb_mdb2schema.xml?r1=1.21&r2=1.22&diff_format=u Index: pearweb/sql/pearweb_mdb2schema.xml diff -u pearweb/sql/pearweb_mdb2schema.xml:1.21 pearweb/sql/pearweb_mdb2schema.xml:1.22 --- pearweb/sql/pearweb_mdb2schema.xml:1.21 Sun Feb 25 07:06:52 2007 +++ pearweb/sql/pearweb_mdb2schema.xml Sun Feb 25 19:14:12 2007 @@ -513,6 +513,12 @@ <length>8</length> <notnull>true</notnull> </field> + <field> + <name>developer</name> + <type>text</type> + <length>20</length> + <notnull>true</notnull> + </field> <index> <name>primary</name> <primary>true</primary> http://cvs.php.net/viewvc.cgi/pearweb/templates/bugs/listpatches.php?r1=1.1&r2=1.2&diff_format=u Index: pearweb/templates/bugs/listpatches.php diff -u pearweb/templates/bugs/listpatches.php:1.1 pearweb/templates/bugs/listpatches.php:1.2 --- pearweb/templates/bugs/listpatches.php:1.1 Sun Feb 25 07:06:52 2007 +++ pearweb/templates/bugs/listpatches.php Sun Feb 25 19:14:12 2007 @@ -1,3 +1,4 @@ +<div class="explain"> <table> <tr> <td> @@ -16,20 +17,19 @@ foreach ($patches as $patch => $revisions): ?> <tr> - <th class="form-label_left"> + <th class="details"> Patch <a href="?bug=<?php echo urlencode($bug) ?>&patch=<?php echo urlencode($patch) - ?>&revision=latest&display=1"><?php echo clean($patch); ?></a> + ?>"><?php echo clean($patch); ?></a> </th> <td> - Patch Versions: <a href="?bug=<?php echo urlencode($bug) ?>&patch=<?php echo urlencode($patch) - ?>&revision=latest&display=1">latest</a> <?php foreach ($revisions as $revision): ?> - <a href="?bug=<?php echo urlencode($bug) ?>&patch=<?php echo urlencode($patch) - ?>&revision=<?php echo $revision ?>&display=1"><?php echo date('Y-m-d H:i:s', $revision) ?></a> + revision <a href="patch-display.php?bug=<?php echo urlencode($bug) ?>&patch=<?php echo urlencode($patch) + ?>&revision=<?php echo $revision[0] ?>&display=1"><?php echo date('Y-m-d H:i:s', $revision[0]) ?></a> by <a href="/user/<?php echo $revision[1] ?>"><?php echo $revision[1] ?></a><br /> <?php endforeach; //foreach ($revisions as $revision) ?> </td> </tr> <?php endforeach; //foreach ($patches as $name => $revisions) endif; //if (!count($patches)) ?> -</table> \ No newline at end of file +</table> +</div> \ No newline at end of file http://cvs.php.net/viewvc.cgi/pearweb/templates/bugs/patchdisplay.php?r1=1.1&r2=1.2&diff_format=u Index: pearweb/templates/bugs/patchdisplay.php diff -u pearweb/templates/bugs/patchdisplay.php:1.1 pearweb/templates/bugs/patchdisplay.php:1.2 --- pearweb/templates/bugs/patchdisplay.php:1.1 Sun Feb 25 07:06:52 2007 +++ pearweb/templates/bugs/patchdisplay.php Sun Feb 25 19:14:12 2007 @@ -10,6 +10,7 @@ echo urlencode($patch) ?>&revision=<?php echo urlencode($revision[0]) ?>"><?php echo date('Y-m-d H:i:s', $revision[0]) ?></a><?php if ($i < count($revisions) - 1) echo ' | '; ?> <?php endforeach; //foreach ($revisions as $i => $revision) ?> +<h3>Developer: <a href="/user/<?php echo $handle ?>"><?php echo $handle ?></a></h3> <pre> <?php echo $patchcontents ?> </pre>