cvs: pear-core /PEAR Validate.php

From: Date: Fri, 10 Sep 2004 19:13:03 +0000
Subject: cvs: pear-core /PEAR Validate.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-23797@lists.php.net to get a copy of this message
cellog Fri Sep 10 15:13:03 2004 EDT Modified files: /pear-core/PEAR Validate.php Log: tweaking of version number validation make sure stable is really a stable version number http://cvs.php.net/diff.php/pear-core/PEAR/Validate.php?r1=1.6&r2=1.7&ty=u Index: pear-core/PEAR/Validate.php diff -u pear-core/PEAR/Validate.php:1.6 pear-core/PEAR/Validate.php:1.7 --- pear-core/PEAR/Validate.php:1.6 Fri Sep 10 15:08:02 2004 +++ pear-core/PEAR/Validate.php Fri Sep 10 15:13:03 2004 @@ -16,7 +16,7 @@ // | Authors: Gregory Beaver <cellog@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Validate.php,v 1.6 2004/09/10 19:08:02 cellog Exp $ +// $Id: Validate.php,v 1.7 2004/09/10 19:13:03 cellog Exp $ define('PEAR_VALIDATE_INSTALLING', 1); define('PEAR_VALIDATE_NORMAL', 3); define('PEAR_VALIDATE_PACKAGING', 7); @@ -162,6 +162,13 @@ $this->_addFailure('version', 'versions less than 1.0 cannot ' . 'be stable'); return false; + } + if (!is_numeric($versioncomponents[2])) { + if (preg_match('/\n+(RC|rc|a|alpha|A|ALPHA|b|beta|B|BETA)\n*/', + $versioncomponents[2])) { + $this->_addFailure('version', 'RC/beta/alpha cannot be stable'); + return false; + } } return true; break;

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