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

From: Date: Mon, 27 Mar 2006 05:45:22 +0000
Subject: cvs: pear-core / package-PEAR.xml package2.xml /PEAR/PackageFile/v2 Validator.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-4681@lists.php.net to get a copy of this message
cellog Mon Mar 27 05:45:22 2006 UTC Modified files: /pear-core package-PEAR.xml package2.xml /pear-core/PEAR/PackageFile/v2 Validator.php Log: * fix Bug #7021: Everything must be within &lt;dir name=&quot;/&quot;&gt; http://cvs.php.net/viewcvs.cgi/pear-core/package-PEAR.xml?r1=1.355&r2=1.356&diff_format=u Index: pear-core/package-PEAR.xml diff -u pear-core/package-PEAR.xml:1.355 pear-core/package-PEAR.xml:1.356 --- pear-core/package-PEAR.xml:1.355 Sun Mar 26 23:10:13 2006 +++ pear-core/package-PEAR.xml Mon Mar 27 05:45:22 2006 @@ -84,6 +84,7 @@ <state>alpha</state> <notes> Minor feature addition/bugfixes + * fix Bug #7021: Everything must be within &lt;dir name=&quot;/&quot;&gt; * fix Bug #7196: PEAR crashes when using autoload_prepend_file * fix Bug #7207: proxy user/pass is not urldecoded in download </notes> http://cvs.php.net/viewcvs.cgi/pear-core/package2.xml?r1=1.249&r2=1.250&diff_format=u Index: pear-core/package2.xml diff -u pear-core/package2.xml:1.249 pear-core/package2.xml:1.250 --- pear-core/package2.xml:1.249 Sun Mar 26 23:10:13 2006 +++ pear-core/package2.xml Mon Mar 27 05:45:22 2006 @@ -89,6 +89,7 @@ <license uri="http://www.php.net/license">PHP License</license> <notes> Minor feature addition/bugfixes + * fix Bug #7021: Everything must be within &lt;dir name=&quot;/&quot;&gt; * fix Bug #7196: PEAR crashes when using autoload_prepend_file * fix Bug #7207: proxy user/pass is not urldecoded in download </notes> http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/PackageFile/v2/Validator.php?r1=1.88&r2=1.89&diff_format=u Index: pear-core/PEAR/PackageFile/v2/Validator.php diff -u pear-core/PEAR/PackageFile/v2/Validator.php:1.88 pear-core/PEAR/PackageFile/v2/Validator.php:1.89 --- pear-core/PEAR/PackageFile/v2/Validator.php:1.88 Mon Mar 27 05:25:48 2006 +++ pear-core/PEAR/PackageFile/v2/Validator.php Mon Mar 27 05:45:22 2006 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Validator.php,v 1.88 2006/03/27 05:25:48 cellog Exp $ +// $Id: Validator.php,v 1.89 2006/03/27 05:45:22 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 @@ -222,6 +222,11 @@ if ($fail) { return false; } + $list = $this->_packageInfo['contents']; + if (isset($list['dir']) && is_array($list['dir']) && isset($list['dir'][0])) { + $this->_multipleToplevelDirNotAllowed(); + return $this->_isValid = 0; + } $this->_validateFilelist(); $this->_validateRelease(); if (!$this->_stack->hasErrors()) { @@ -1595,6 +1600,13 @@ 'Invalid dependency group name "%name%"'); } + function _multipleToplevelDirNotAllowed() + { + $this->_stack->push(__FUNCTION__, 'error', array(), + 'Multiple top-level <dir> tags are not allowed. Enclose them ' . + 'in a <dir name="/">'); + } + function _analyzeBundledPackages() { if (!$this->_isValid) {

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