case 'Stale': $where_clause .= ' AND bugdb.status NOT IN' . " ('Closed', 'Duplicate', 'Bogus')" . ' AND TO_DAYS(NOW())-TO_DAYS(bugdb.ts2) > 30'; break; case 'Not Assigned': $where_clause .= ' AND bugdb.status NOT IN' . " ('Closed', 'Duplicate', 'Bogus', 'Assigned'," . " 'Wont Fix', 'Suspended')"; break; // Closed Reports Since Last Release // Closed Reports Since Last Release case 'CRSLR': if (!isset($_GET['package_name']) || count($_GET['package_name']) > 1) { // Act as ALL break; } // Fetch the last release date include_once 'pear-database-package.php'; $releaseDate = package::getRecent(1, $_GET['package_name'][0]); if (PEAR::isError($releaseDate)) { break; } $where_clause .= ' AND bugdb.status IN' . " ('Closed', 'Duplicate', 'Bogus', 'Wont Fix', 'Suspended')\n AND (UNIX_TIMESTAMP('" . $releaseDate[0]['releasedate'] . "') < UNIX_TIMESTAMP(bugdb.ts2))\n "; break; case 'Open': default: $where_clause .= " AND bugdb.status IN ('Open', 'Assigned'," . " 'Analyzed', 'Critical', 'Verified')"; case 'OpenFeedback': default: $where_clause .= " AND bugdb.status IN ('Open', 'Assigned'," . " 'Analyzed', 'Critical', 'Verified', 'Feedback')"; } if (empty($_GET['search_for'])) { $search_for = ''; } else {
$savant->display('roadmapform.php'); exit; } $bugdb->roadmap_version = $_POST['roadmap_version']; if ($_POST['releasedate'] == 'future') { // my birthday will represent the future ;) $_POST['releasedate'] = '1976-09-02 17:15:30'; } $bugdb->releasedate = date('Y-m-d H:i:s', strtotime($_POST['releasedate'])); $bugdb->package = $_GET['package']; $bugdb->description = $_POST['description']; $rid = $bugdb->insert(); if (isset($_POST['importbugs'])) { // Fetch the last release date include_once 'pear-database-package.php'; $releaseDate = package::getRecent(1, $_GET['package']); if (PEAR::isError($releaseDate)) { break; } $query = ' SELECT SQL_CALC_FOUND_ROWS bugdb.id FROM bugdb LEFT JOIN packages ON packages.name = bugdb.package_name WHERE bugdb.registered IN(1,0) AND bugdb.package_name = ? AND bugdb.status IN' . " ('Closed', 'Duplicate', 'Bogus', 'Wont Fix', 'Suspended')\n AND (UNIX_TIMESTAMP('" . $releaseDate[0]['releasedate'] . "') < UNIX_TIMESTAMP(bugdb.ts2))" . 'AND (bugdb.bug_type = "Bug" OR bugdb.bug_type="Documentation Problem")'; $link = Bug_DataObject::bugDB('bugdb_roadmap_link'); $res =& $dbh->query($query, array($_GET['package'])); while ($row =& $res->fetchRow(DB_FETCHMODE_ASSOC)) { $link->id = $row['id']; $link->delete();
case 'Stale': $where_clause .= ' AND bugdb.status NOT IN' . " ('Closed', 'Duplicate', 'Bogus')" . ' AND TO_DAYS(NOW()) - TO_DAYS(bugdb.ts2) > 30'; break; case 'Not Assigned': $where_clause .= ' AND bugdb.status NOT IN' . " ('Closed', 'Duplicate', 'Bogus', 'Assigned'," . " 'Wont Fix', 'Suspended')"; break; // Closed Reports Since Last Release // Closed Reports Since Last Release case 'CRSLR': if (empty($package_name) || count($package_name) > 1) { // Act as ALL break; } // Fetch the last release date include_once 'pear-database-package.php'; $releaseDate = package::getRecent(1, $package_name[0]); if (PEAR::isError($releaseDate)) { break; } $where_clause .= ' AND bugdb.status IN' . " ('Closed', 'Duplicate', 'Bogus', 'Wont Fix', 'Suspended')\n AND (UNIX_TIMESTAMP('" . $releaseDate[0]['releasedate'] . "') < UNIX_TIMESTAMP(bugdb.ts2))\n "; break; case 'Open': default: $where_clause .= " AND bugdb.status IN ('Open', 'Assigned'," . " 'Analyzed', 'Critical', 'Verified')"; case 'OpenFeedback': default: $where_clause .= " AND bugdb.status IN ('Open', 'Assigned'," . " 'Analyzed', 'Critical', 'Verified', 'Feedback')"; } if (empty($_GET['search_for'])) { $search_for = ''; } else {
} $name = user::info($user, "name"); $channel_title = "PEAR: Latest releases for " . $user; $channel_description = "The latest releases for the PEAR developer " . $user . " (" . $name['name'] . ")"; $items = user::getRecentReleases($user); break; case 'pkg': $package = $argument; include_once 'pear-database-package.php'; if (package::isValid($package) == false) { rss_bailout(); return PEAR::raiseError("The requested URL " . $_SERVER['REQUEST_URI'] . " was not found on this server."); } $channel_title = "Latest releases of " . $package; $channel_description = "The latest releases for the package " . $package; $items = package::getRecent(10, $package); break; case 'cat': $category = $argument; include_once 'pear-database-category.php'; if (category::isValid($category) == false) { rss_bailout(); } $channel_title = "PEAR: Latest releases in category " . $category; $channel_description = "The latest releases in the category " . $category; $items = category::getRecent(10, $category); break; case 'pepr': if ($argument == 'pepr') { $channel_title = "PEPr: Latest proposals."; $channel_description = "The latest PEPr proposals.";
// how much time elapsed since last release, in seconds $tables[$state]['old'] = new HTML_Table(array('id' => 'old', 'cellspacing' => 0, 'class' => 'sortable')); $tables[$state]['old']->setCaption('Packages with state <em>' . $state . '</em> which have not been released in ' . $time_scale / 86400 . ' days'); $tables[$state]['old']->setHeaderContents(0, 0, 'Package'); $tables[$state]['old']->setHeaderContents(0, 1, 'Version'); $tables[$state]['old']->setHeaderContents(0, 2, 'Date'); $tables[$state]['old']->setHeaderContents(0, 3, '# bugs'); $tables[$state]['new'] = new HTML_Table(array('id' => 'new', 'cellspacing' => 0, 'class' => 'sortable')); $tables[$state]['new']->setCaption('Packages with state <em>' . $state . '</em> with a release in the past ' . $time_scale / 86400 . ' days'); $tables[$state]['new']->setHeaderContents(0, 0, 'Package'); $tables[$state]['new']->setHeaderContents(0, 1, 'Version'); $tables[$state]['new']->setHeaderContents(0, 2, 'Date'); $tables[$state]['new']->setHeaderContents(0, 3, '# bugs'); foreach ($packages as $package => $pck_data) { $total_packages_nbr++; $latest_release = $pck->getRecent(1, $package); if (PEAR::isError($latest_release) || count($latest_release) == 0) { continue; } // we just want to see the packages for a given state if ($latest_release[0]['state'] != $state) { continue; } $release_date = strtotime($latest_release[0]['releasedate']); $status = 'new'; if (time() - $time_scale > $release_date) { $status = 'old'; } $tables[$state][$status]->addRow(array(make_link('/package/' . $package, $package, '', 'title="' . $package . '"'), $latest_release[0]['version'], date('Y-m-d', $release_date), make_link("/bugs/search.php?cmd=display&package_name%5B%5D=" . urlencode($package), bugcount($package), '', 'title="Bugs for package ' . $package . '"'))); $studied_packages_nbr++; }