cvs: pear-core /PEAR/PackageFile/v2 Validator.php

From: Date: Tue, 02 Nov 2004 04:52:57 +0000
Subject: cvs: pear-core /PEAR/PackageFile/v2 Validator.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-1208@lists.php.net to get a copy of this message
cellog Mon Nov 1 23:52:57 2004 EDT Modified files: /pear-core/PEAR/PackageFile/v2 Validator.php Log: add a few more empty tag checks, fix the license check to allow for no attribs http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v2/Validator.php?r1=1.2&r2=1.3&ty=u Index: pear-core/PEAR/PackageFile/v2/Validator.php diff -u pear-core/PEAR/PackageFile/v2/Validator.php:1.2 pear-core/PEAR/PackageFile/v2/Validator.php:1.3 --- pear-core/PEAR/PackageFile/v2/Validator.php:1.2 Thu Oct 28 18:25:59 2004 +++ pear-core/PEAR/PackageFile/v2/Validator.php Mon Nov 1 23:52:55 2004 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Validator.php,v 1.2 2004/10/28 22:25:59 cellog Exp $ +// $Id: Validator.php,v 1.3 2004/11/02 04:52:55 cellog Exp $ /** * Private validation class used by PEAR_PackageFile_v2 - do not use directly, its * sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller @@ -104,6 +104,23 @@ if (is_array($this->_packageInfo['license']) && !isset($this->_packageInfo['license']['_content'])) { $this->_tagCannotBeEmpty('license'); + } elseif (empty($this->_packageInfo['license'])) { + $this->_tagCannotBeEmpty('license'); + } + if (empty($this->_packageInfo['summary'])) { + $this->_tagCannotBeEmpty('summary'); + } + if (empty($this->_packageInfo['summary'])) { + $this->_tagCannotBeEmpty('description'); + } + if (empty($this->_packageInfo['date'])) { + $this->_tagCannotBeEmpty('date'); + } + if (empty($this->_packageInfo['notes'])) { + $this->_tagCannotBeEmpty('notes'); + } + if (isset($this->_packageInfo['time'])&& empty($this->_packageInfo['time'])) { + $this->_tagCannotBeEmpty('time'); } if (isset($this->_packageInfo['dependencies'])) { $this->_validateDependencies();

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