cvs: pearweb /include pear-rest.php

From: Date: Sun, 27 Apr 2008 00:55:11 +0000
Subject: cvs: pearweb /include pear-rest.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-7491@lists.php.net to get a copy of this message
dufuz Sun Apr 27 00:55:11 2008 UTC Modified files: /pearweb/include pear-rest.php Log: Cosmetics and use SITE for package type http://cvs.php.net/viewvc.cgi/pearweb/include/pear-rest.php?r1=1.50&r2=1.51&diff_format=u Index: pearweb/include/pear-rest.php diff -u pearweb/include/pear-rest.php:1.50 pearweb/include/pear-rest.php:1.51 --- pearweb/include/pear-rest.php:1.50 Sun Mar 9 00:52:11 2008 +++ pearweb/include/pear-rest.php Sun Apr 27 00:55:11 2008 @@ -56,18 +56,19 @@ @chmod($cdir, 0777); } - $category = $dbh->getRow('SELECT * FROM categories WHERE name = ?', array($category), - DB_FETCHMODE_ASSOC); + $sql = 'SELECT name, description FROM categories WHERE name = ?'; + $category = $dbh->getRow($sql, array($category), DB_FETCHMODE_ASSOC); if (PEAR::isError($category)) { return $category; } - $query = "SELECT p.name AS name " . - "FROM packages p, categories c " . - "WHERE p.package_type = 'pear' " . - "AND p.category = c.id AND c.name = ? AND p.approved = 1"; + $query = ' + SELECT p.name AS name + FROM packages p, categories c + WHERE p.package_type = ? + AND p.category = c.id AND c.name = ? AND p.approved = 1'; - $sth = $dbh->getAll($query, array($category['name']), DB_FETCHMODE_ASSOC); + $sth = $dbh->getAll($query, array(SITE, $category['name']), DB_FETCHMODE_ASSOC); if (PEAR::isError($sth)) { return $sth; } @@ -131,6 +132,7 @@ include_once 'pear-database-category.php'; $packages = category::listPackages($category); + $fullpackageinfo = '<?xml version="1.0" encoding="UTF-8" ?> <f xmlns="http://pear.php.net/dtd/rest.categorypackageinfo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

« previous php.pear.core (#7491) next »