cvs: pearweb /include/Damblan/RSS Category.php Package.php
| From: | Martin Jansen | Date: | Sun, 14 Sep 2003 08:02:50 +0000 |
| Subject: | cvs: pearweb /include/Damblan/RSS Category.php Package.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-12710@lists.php.net to get a copy of this message | ||
mj Sun Sep 14 04:02:50 2003 EDT
Modified files:
/pearweb/include/Damblan/RSS Category.php Package.php
Log:
* Adding check to ensure that only feeds vor valid categories and packages
are generated.
Index: pearweb/include/Damblan/RSS/Category.php
diff -u pearweb/include/Damblan/RSS/Category.php:1.3 pearweb/include/Damblan/RSS/Category.php:1.4
--- pearweb/include/Damblan/RSS/Category.php:1.3 Fri Sep 5 10:54:39 2003
+++ pearweb/include/Damblan/RSS/Category.php Sun Sep 14 04:02:50 2003
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Author: Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
- $Id: Category.php,v 1.3 2003/09/05 14:54:39 mj Exp $
+ $Id: Category.php,v 1.4 2003/09/14 08:02:50 mj Exp $
*/
require_once "pear-database.php";
@@ -27,12 +27,16 @@
* @author Martin Jansen <mj@php.net>
* @package Damblan
* @category RSS
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
class Damblan_RSS_Category extends Damblan_RSS_Common {
function Damblan_RSS_Category($value) {
parent::Damblan_RSS_Common();
+
+ if (category::isValid($value) == false) {
+ return PEAR::raiseError("The requested URL " .
$_SERVER['REQUEST_URI'] . " was not found on this server.");
+ }
$this->setTitle("PEAR: Latest releases in category " . $value);
$this->setDescription("The latest releases in the category " . $value);
Index: pearweb/include/Damblan/RSS/Package.php
diff -u pearweb/include/Damblan/RSS/Package.php:1.3 pearweb/include/Damblan/RSS/Package.php:1.4
--- pearweb/include/Damblan/RSS/Package.php:1.3 Fri Sep 5 10:54:39 2003
+++ pearweb/include/Damblan/RSS/Package.php Sun Sep 14 04:02:50 2003
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Author: Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
- $Id: Package.php,v 1.3 2003/09/05 14:54:39 mj Exp $
+ $Id: Package.php,v 1.4 2003/09/14 08:02:50 mj Exp $
*/
require_once "pear-database.php";
@@ -27,12 +27,16 @@
* @author Martin Jansen <mj@php.net>
* @package Damblan
* @category RSS
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
class Damblan_RSS_Package extends Damblan_RSS_Common {
function Damblan_RSS_Package($value) {
parent::Damblan_RSS_Common();
+
+ if (package::isValid($value) == false) {
+ return PEAR::raiseError("The requested URL " .
$_SERVER['REQUEST_URI'] . " was not found on this server.");
+ }
$this->setTitle("Latest releases");
$this->setDescription("The latest releases for the package " . $value);