cvs: pear-core /PEAR Validate.php
| From: | Greg Beaver | Date: | Fri, 10 Sep 2004 20:37:51 +0000 |
| Subject: | cvs: pear-core /PEAR Validate.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-23808@lists.php.net to get a copy of this message | ||
cellog Fri Sep 10 16:37:51 2004 EDT
Modified files:
/pear-core/PEAR Validate.php
Log:
oops - use \d for digits, not \n for numbers
http://cvs.php.net/diff.php/pear-core/PEAR/Validate.php?r1=1.10&r2=1.11&ty=u
Index: pear-core/PEAR/Validate.php
diff -u pear-core/PEAR/Validate.php:1.10 pear-core/PEAR/Validate.php:1.11
--- pear-core/PEAR/Validate.php:1.10 Fri Sep 10 16:21:42 2004
+++ pear-core/PEAR/Validate.php Fri Sep 10 16:37:51 2004
@@ -16,7 +16,7 @@
// | Authors: Gregory Beaver <cellog@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Validate.php,v 1.10 2004/09/10 20:21:42 cellog Exp $
+// $Id: Validate.php,v 1.11 2004/09/10 20:37:51 cellog Exp $
define('PEAR_VALIDATE_INSTALLING', 1);
define('PEAR_VALIDATE_NORMAL', 3);
define('PEAR_VALIDATE_PACKAGING', 7);
@@ -197,7 +197,7 @@
return false;
}
if (!is_numeric($versioncomponents[2])) {
- if (preg_match('/\n+(rc|a|alpha||b|beta|)\n*/i',
+ if (preg_match('/\d+(rc|a|alpha||b|beta|)\d*/i',
$versioncomponents[2])) {
$this->_addFailure('version', 'RC/beta/alpha cannot be
stable');
return false;
@@ -223,7 +223,7 @@
// packager automatically sets date, so only validate if
// pear validate is called
if ($this->_state = PEAR_VALIDATE_NORMAL) {
- if (!preg_match('/\n\n\n\n\-\n\n\-\n\n/',
+ if (!preg_match('/\d\d\d\d\-\d\d\-\d\d/',
$this->_packagexml->getDate())) {
$this->_addFailure('date', 'invalid release date "' .
$this->_packagexml->getDate());
@@ -247,7 +247,7 @@
// packager automatically sets time, so only validate if
// pear validate is called
if ($this->_state = PEAR_VALIDATE_NORMAL) {
- if (!preg_match('/\n\n:\n\n:\n\n/',
+ if (!preg_match('/\d\d:\d\d:\d\d/',
$this->_packagexml->getDate())) {
$this->_addFailure('time', 'invalid release time "' .
$this->_packagexml->getDate());