cvs: pearweb /public_html/qa packages_orphan.php
| From: | Arnaud Limbourg | Date: | Sun, 26 Nov 2006 14:50:02 +0000 |
| Subject: | cvs: pearweb /public_html/qa packages_orphan.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-5217@lists.php.net to get a copy of this message | ||
arnaud Sun Nov 26 14:50:02 2006 UTC
Modified files:
/pearweb/public_html/qa packages_orphan.php
Log:
unmaintained packages: adding a link to the superseding package if there is one
http://cvs.php.net/viewvc.cgi/pearweb/public_html/qa/packages_orphan.php?r1=1.5&r2=1.6&diff_format=u
Index: pearweb/public_html/qa/packages_orphan.php
diff -u pearweb/public_html/qa/packages_orphan.php:1.5
pearweb/public_html/qa/packages_orphan.php:1.6
--- pearweb/public_html/qa/packages_orphan.php:1.5 Mon Oct 2 19:35:42 2006
+++ pearweb/public_html/qa/packages_orphan.php Sun Nov 26 14:50:02 2006
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: Arnaud Limbourg <arnaud@limbourg.com> |
+----------------------------------------------------------------------+
- $Id: packages_orphan.php,v 1.5 2006/10/02 19:35:42 arnaud Exp $
+ $Id: packages_orphan.php,v 1.6 2006/11/26 14:50:02 arnaud Exp $
*/
/**
@@ -26,10 +26,15 @@
response_header('Quality Assurance Initiative - Orphan packages',
false);
-$packages = $dbh->getAll("SELECT p.name " .
- " FROM packages p ".
- "WHERE p.unmaintained=1 AND p.package_type = 'pear' AND p.approved = 1 ".
- "ORDER BY p.name", null, DB_FETCHMODE_ASSOC);
+$query = "
+ select p1.name as name1, p2.name as name2
+ from packages p1
+ left join packages p2 on p1.newpk_id=p2.id
+ where p1.unmaintained=1 and p1.package_type = 'pear' and p1.approved = 1
+ order by p1.name
+";
+
+$packages = $dbh->getAll($query, null, DB_FETCHMODE_ASSOC);
if (count($packages) == 0) {
echo '<p>There are no orphan packages</p>';
@@ -39,21 +44,23 @@
echo "<h3>List of orphan packages</h3>\n";
-$text_mode = '';
-
echo "<ul>\n";
foreach ($packages as $pck => $info) {
- $link = make_link('/package/' . $info['name'],
- $info['name'], '', 'title="' . $info['name'] .
'"');
+ $link = make_link('/package/' . $info['name1'],
+ $info['name1'], '', 'title="' . $info['name1']
. '"');
+
+ $link_superseding = '';
+
+ if (!empty($info['name2'])) {
+ $link_superseding = 'There is a superseding package: ';
+ $link_superseding .= make_link('/package/' . $info['name2'],
+ $info['name2'], '', 'title="' . $info['name2']
. '"');
+ }
- echo '<li>' . $link . "</li>\n";
-// $text_mode .= $info['name'] . "\n";
+ echo '<li>' . $link . ' ' . $link_superseding .
"</li>\n";
}
echo "</ul>\n";
-// output the list as plain text. This will be added to a text
-// file so people can browse the list
-//echo "<pre>" . $text_mode . "</pre>";
response_footer();
?>