cvs: pearweb /public_html package-info.php

From: Date: Wed, 15 Oct 2003 16:44:34 +0000
Subject: cvs: pearweb /public_html package-info.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-13631@lists.php.net to get a copy of this message
mj Wed Oct 15 12:44:34 2003 EDT Modified files: /pearweb/public_html package-info.php Log: * Dropping the custom query and using PEAR_Package instead. Index: pearweb/public_html/package-info.php diff -u pearweb/public_html/package-info.php:1.52 pearweb/public_html/package-info.php:1.53 --- pearweb/public_html/package-info.php:1.52 Tue Oct 14 13:30:54 2003 +++ pearweb/public_html/package-info.php Wed Oct 15 12:44:34 2003 @@ -16,7 +16,7 @@ | Authors: Martin Jansen <mj@php.net> | | Tomas V.V.Cox <cox@idecnet.com> | +----------------------------------------------------------------------+ - $Id: package-info.php,v 1.52 2003/10/14 17:30:54 mj Exp $ + $Id: package-info.php,v 1.53 2003/10/15 16:44:34 mj Exp $ */ require_once "Damblan/URL.php"; @@ -322,8 +322,11 @@ if (count($deps) > 0) { foreach ($deps as $row) { // Print link if it's a PEAR package and it's in the db - if ($row['type'] == 'pkg' AND $pid = $dbh->getOne(sprintf("SELECT id FROM packages WHERE approved = 1 AND name = '%s'", $row['name']))) { - $row['name'] = sprintf('<a href="/package/%s">%s</a>', $row['name'], $row['name']); + if ($row['type'] == 'pkg') { + $dep_pkg =& new PEAR_Package($dbh, $row['name']); + if ($dep_pkg->package_type = 'pear' && $dep_pkg->approved = 1) { + $row['name'] = $dep_pkg->makeLink(); + } } if (isset($rel_trans[$row['relation']])) {

« previous php.pear.cvs (#13631) next »