cvs: pear /Validate/Validate IS.php

From: Date: Fri, 16 Sep 2005 20:21:37 +0000
Subject: cvs: pear /Validate/Validate IS.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-34812@lists.php.net to get a copy of this message
bjori Fri Sep 16 16:21:37 2005 EDT Modified files: /pear/Validate/Validate IS.php Log: UK? Whoooups :P http://cvs.php.net/diff.php/pear/Validate/Validate/IS.php?r1=1.2&r2=1.3&ty=u Index: pear/Validate/Validate/IS.php diff -u pear/Validate/Validate/IS.php:1.2 pear/Validate/Validate/IS.php:1.3 --- pear/Validate/Validate/IS.php:1.2 Fri Sep 16 14:14:31 2005 +++ pear/Validate/Validate/IS.php Fri Sep 16 16:21:35 2005 @@ -2,7 +2,7 @@ /* vim: set expandtab tabstop=4 shiftwidth=4: */ /** - * Specific validation methods for data used in the UK + * Specific validation methods for data used in the IS * * PHP versions 4 * @@ -17,7 +17,7 @@ * @author Hannes Magnusson <bjori@php.net> * @copyright 2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: IS.php,v 1.2 2005/09/16 18:14:31 bjori Exp $ + * @version CVS: $Id: IS.php,v 1.3 2005/09/16 20:21:35 bjori Exp $ */ /** @@ -57,7 +57,7 @@ if (!is_numeric($ssn)) { $ssn = str_replace(array(" ", "-"), "", $ssn); } - if (strlen($ssn) != 10) { + if (strlen($ssn) != 10 || !is_numeric($ssn)) { return false; } @@ -141,7 +141,7 @@ * fseek($fp, 0); */ - $file = "@DATADIR@/Validate_IS/IS_postcodes.txt"; + $file = "data/IS_postcodes.txt"; if (file_exists($file)) { if (is_writable($file) && filemtime($file) < time()-60*60*24*30) { $url = "http://www.postur.is/Gogn/Gotuskra/postnumer.txt";

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