cvs: pear-core /PEAR Validate.php

From: Date: Thu, 03 Mar 2005 03:07:08 +0000
Subject: cvs: pear-core /PEAR Validate.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-30007@lists.php.net to get a copy of this message
cellog Wed Mar 2 22:07:08 2005 EDT Modified files: /pear-core/PEAR Validate.php Log: relax package name validation, there is no need to force failure on issues like these that may change in the future. http://cvs.php.net/diff.php/pear-core/PEAR/Validate.php?r1=1.35&r2=1.36&ty=u Index: pear-core/PEAR/Validate.php diff -u pear-core/PEAR/Validate.php:1.35 pear-core/PEAR/Validate.php:1.36 --- pear-core/PEAR/Validate.php:1.35 Sun Feb 27 16:39:47 2005 +++ pear-core/PEAR/Validate.php Wed Mar 2 22:07:08 2005 @@ -16,7 +16,7 @@ // | Authors: Gregory Beaver <cellog@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Validate.php,v 1.35 2005/02/27 21:39:47 cellog Exp $ +// $Id: Validate.php,v 1.36 2005/03/03 03:07:08 cellog Exp $ define('PEAR_VALIDATE_INSTALLING', 1); define('PEAR_VALIDATE_UNINSTALLING', 2); // this is not bit-mapped like the others define('PEAR_VALIDATE_NORMAL', 3); @@ -202,17 +202,18 @@ $majver = substr($majver, 1); } if ($majver != $test) { - $this->_addFailure('package', "package $name extends package " . - $this->_packagexml->getExtends() . ' and so the name must ' . + $this->_addWarning('package', "package $name extends package " . + $this->_packagexml->getExtends() . ' and so the name should ' . 'have a postfix equal to the major version like "' . $this->_packagexml->getExtends() . $test . '"'); - return false; + return true; } elseif (substr($name, 0, strlen($name) - $vlen) != $this->_packagexml->getExtends()) { - $this->_addFailure('package', "package $name extends package " . + $this->_addWarning('package', "package $name extends package " . $this->_packagexml->getExtends() . ' and so the name must ' . 'be an extension like "' . $this->_packagexml->getExtends() . $test . '"'); + return true; } } }

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