cvs: pear-core /PEAR/PackageFile/Generator v1.php

From: Date: Thu, 04 Nov 2004 04:15:49 +0000
Subject: cvs: pear-core /PEAR/PackageFile/Generator v1.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-25655@lists.php.net to get a copy of this message
cellog Wed Nov 3 23:15:49 2004 EDT Modified files: /pear-core/PEAR/PackageFile/Generator v1.php Log: add auto-date generation at package time http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/Generator/v1.php?r1=1.14&r2=1.15&ty=u Index: pear-core/PEAR/PackageFile/Generator/v1.php diff -u pear-core/PEAR/PackageFile/Generator/v1.php:1.14 pear-core/PEAR/PackageFile/Generator/v1.php:1.15 --- pear-core/PEAR/PackageFile/Generator/v1.php:1.14 Mon Oct 18 23:13:39 2004 +++ pear-core/PEAR/PackageFile/Generator/v1.php Wed Nov 3 23:15:48 2004 @@ -18,7 +18,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: v1.php,v 1.14 2004/10/19 03:13:39 cellog Exp $ +// $Id: v1.php,v 1.15 2004/11/04 04:15:48 cellog Exp $ require_once 'PEAR/Validate.php'; /** * This class converts a PEAR_PackageFile_v1 object into any output format. @@ -47,6 +47,7 @@ */ function toXml($state = PEAR_VALIDATE_NORMAL) { + $this->_packagefile->setDate(date('Y-m-d')); if (!$this->_packagefile->validate($state)) { return false; } @@ -60,7 +61,12 @@ $ret = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n"; $ret .= "<!DOCTYPE package SYSTEM \"http://pear.php.net/dtd/package-1.0\">\n"; $ret .= "<package version=\"1.0\" packagerversion=\"@PEAR-VER@\"> - <name>$pkginfo[package]</name> + <name>$pkginfo[package]</name>"; + if (isset($pkginfo['extends'])) { + $ret .= " +<extends>$pkginfo[extends]</extends>"; + } + " <summary>".htmlspecialchars($pkginfo['summary'])."</summary> <description>".trim(htmlspecialchars($pkginfo['description']))."\n </description> <maintainers>

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