Latest bugs filed for '; if ( $doNotCapitalise ) echo $project; else echo ucwords($project); echo "\n\n"; } $Latest_bugs_filed = 'Latest bugs filed on '; if ( $hide_Latest_bugs_filed ) $Latest_bugs_filed = ''; if (!isset($amount)) $amount = 10; $bug_url = "http://bugzilla." . HOST . "/show_bug.cgi?id="; require_once(PHP_INC.CONNECT); // port to PEAR :: DB ? require_once 'DB.php'; $dsn = "mysql://$user:$password@$host/$database"; $q1 =& DB::connect($dsn); if (DB::isError($q1)) { die($q1->getMessage()); } $rq1 = $q1 -> getOne("select id from products where name='$project'"); if (DB::isError($rq1)) { die ($rq1->getMessage()); } if($rq1) { $pID = $rq1; $q2 =& DB::connect($dsn); if (DB::isError($q2)) { die($q2->getMessage()); } $rq2 = $q2 -> query("select bug_id, short_desc, resolution, bug_status from bugs where product_id=$pID ORDER BY bug_id DESC LIMIT $amount"); echo '' . "\n"; echo "\n\n"; echo ''; echo '' . "\n\n"; echo "\n\n"; echo "\n"; while ($row = $rq2 -> fetchRow(DB_FETCHMODE_OBJECT)) { // do stuff $printstrike = false; print "\n\n\n"; } if ( ! $rq2 -> numRows() ) echo '' . "\n"; $rq2 -> free(); echo "\n"; echo "
Bug #Description
\n"; $bug_id = $row -> bug_id; $status = $row -> bug_status; $strike = $row -> resolution; if ($status == "CLOSED" || $strike == "DUPLICATE" || $strike == "FIXED" || $strike == "WONTFIX" || $strike == "WORKSFORME" || $strike == "INVALID") $printstrike = true; if ($printstrike) print ''; // ? print ""; print $bug_id; print ""; if ($printstrike) print ""; print "\n\n"; print htmlspecialchars ($row -> short_desc, ENT_QUOTES); print "
No bugs.
\n"; } else { echo "\n

This project has no bugzilla product.

\n"; } $q2 -> disconnect(); $q1 -> disconnect(); ?>