Source for file packages_orphan_patches.php
Documentation is available at packages_orphan_patches.php
+----------------------------------------------------------------------+
| PEAR Web site version 1.0 |
+----------------------------------------------------------------------+
| Copyright (c) 2001-2008 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/3_01.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Helgi Þormar Þorbjörnsson <helgi@php.net> |
+----------------------------------------------------------------------+
$Id: patches_on_open_reports.php 281637 2009-06-04 08:51:45Z clockwerx $
include_once 'HTML/Table.php';
// Sortable tables http://www.kryogenix.org/code/browser/sorttable/
$extra_header = '<script type="text/javascript" src="/javascript/sorttable.js"></script>';
response_header ('Quality Assurance Initiative - Orphan Packages with Patches',
JOIN bugdb ON packages.name = bugdb.package_name AND bugdb.status IN ('Open', 'Assigned', 'Analyzed', 'Critical', 'Verified')
JOIN bugdb_patchtracker ON bugdb.id = bugdb_patchtracker.bugdb_id
unmaintained = 1 AND package_type = 'pear' AND approved = 1
(packages.newchannel IS NULL OR packages.newchannel = '')
(packages.newpackagename IS NULL OR packages.newpackagename = '')
packages.id, packages.name, bugdb.package_name, bugdb.id
$res = $dbh->getAll ($sql, null , DB_FETCHMODE_ASSOC );
$total_rows = $dbh->getOne ('SELECT FOUND_ROWS()');
echo '<h1>Orphan packages with patches</h1>';
echo 'Found ' . $total_rows . ' reports with patches attached<br /><br />';
$bugs = array ('pear' => array ());
foreach ($res as $data) {
$bugs[$data['package_type']][$data['name']]['bug_id'][] = $data['bug_id'];
$table = new HTML_Table (array ('class' => 'sortable'));
$table->setHeaderContents (0 , 0 , 'Package');
$table->setHeaderContents (0 , 1 , '# bugs');
foreach ($bugs['pear'] as $name => $qa) {
make_link ('/package/' . $name . '/', $name),
make_link ('#package_bugs_' . $name, count($qa['bug_id'])),
$table->setCellAttributes ($row, 1 , 'style="text-align: center;"');
echo '<h2 id="pear">PEAR (' . count($bugs['pear']) . ')</h2>';
foreach ($bugs['pear'] as $name => $qa) {
echo '<h3 id="package_bugs_' . $name . '">' . $name . '</h3>';
foreach ($qa['bug_id'] as $bug_id) {
echo '<li>' . make_link ('/bugs/' . $bug_id, $bug_id) . '</li>';
Documentation generated on Mon, 11 Mar 2019 15:46:40 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|