File:  [mozdev] / cdn / www / boogs.html
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Sat Jan 29 18:58:23 2005 UTC (12 years, 8 months ago) by cdn
Branches: MAIN
CVS tags: HEAD
PEAR::DB [take 3]

<h5 class="page-header">Bugs</h5>

<ul>
<li>Enter a <a href="http://www.mozdev.org/bugs/enter_bug.cgi?product=cdn">new bug</a> for cdn</li>
<li>View <a href="http://mozdev.org/bugs/buglist.cgi?email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;email2=&amp;emailtype2=substring&amp;emailreporter2=1&amp;bugidtype=include&amp;bug_id=&amp;changedin=&amp;votes=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;product=cdn&amp;short_desc=&amp;short_desc_type=allwordssubstr&amp;long_desc=&amp;long_desc_type=allwordssubstr&amp;bug_file_loc=&amp;bug_file_loc_type=allwordssubstr&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=&amp;cmdtype=doit&amp;order=Bug+Number">all bugs</a>
<li>See all <a href="http://mozdev.org/bugs/buglist.cgi?bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;email2=&amp;emailtype2=substring&amp;emailreporter2=1&amp;bugidtype=include&amp;bug_id=&amp;changedin=&amp;votes=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;product=cdn&amp;short_desc=&amp;short_desc_type=allwordssubstr&amp;long_desc=&amp;long_desc_type=allwordssubstr&amp;bug_file_loc=&amp;bug_file_loc_type=allwordssubstr&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=&amp;cmdtype=doit&amp;order=Bug+Number">open bugs</a></li>
<li>Search by Bug Number<br>
<form action="http://mozdev.org/bugs/show_bug.cgi" method="get">
<p><input type="submit" value="Find"> <input size="6" name="id"></p></form>
</li>
</ul>
<?php $doNotCapitalise = 1; ?>
<?php

// rewritten to suit bugzilla 2.18 branch

  if ( ! $hiding_BZ_h4 ) {
    echo '<h4 id="BZ-h4">Latest bugs filed for ';
    if ( $doNotCapitalise ) echo $project;
    else echo ucwords($project);
    echo "</h4>\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 '<table class="BZ-table" cellspacing="0" cellpadding="0" border="0">' . "\n";

 echo "<thead>\n<tr>\n";
 echo '<th class="BZ-th-bug">Bug #</th>';
 echo '<th class="BZ-th-desc">Description</th>' . "\n\n";
 echo "</tr>\n</thead>\n";

 echo "<tbody>\n";
 while ($row = $rq2 -> fetchRow(DB_FETCHMODE_OBJECT)) {
  // do stuff
    $printstrike = false;
    print "<tr><td>\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 '<span class="BZ-strike" title="' . $status . ' ' . $strike . '">'; // ?
    print "<a href=\"$bug_url$bug_id\">";
    print $bug_id;
    print "</a>";
    if ($printstrike)
      print "</span>";
    print "\n</td>\n<td>\n";
    print htmlspecialchars ($row -> short_desc, ENT_QUOTES);
    print "</td>\n</tr>\n";
 }

 if ( ! $rq2 -> numRows() )
  echo '<tr><td colspan="2">No bugs.</td></tr>' . "\n";

 $rq2 -> free();

 echo "</tbody>\n";
 echo "</table>\n";

} else {
  echo "\n<p>This project has no bugzilla product.</p>\n";
}

 $q2 -> disconnect();
 $q1 -> disconnect();

?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>