debian/0000755000000000000000000000000012260415224007164 5ustar debian/README.Debian0000644000000000000000000000031512260412773011232 0ustar php-validate for Debian -------------------------- This extension has been created with dh-make-pear which is part of dh-make-php. -- Dario Minnucci , Fri, 27 Apr 2012 02:28:31 +0200 debian/compat0000644000000000000000000000000212260412773010370 0ustar 9 debian/copyright0000644000000000000000000001007412260412773011127 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Validate Source: http://pear.php.net/package/Validate Files: * Copyright: 1997-2006, Pierre-Alain Joye 1997-2006, Tomas V.V.Cox 1997-2006, Amir Mohammad Saied License: BSD Redistribution and use in source and binary forms, with or without modification , are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, th is list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/ or other materials provided with the distribution. . 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WA RRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABIL ITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR C ONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOW EVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILI TY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE U SE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: docs/* Copyright: 1997-2005, Tomas V.V.Cox 1997-2005, Pierre-Alain Joye License: BSD Redistribution and use in source and binary forms, with or without modification , are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, th is list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/ or other materials provided with the distribution. . 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WA RRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABIL ITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR C ONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOW EVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILI TY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE U SE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: debian/* Copyright: 2012, Dario Minnucci License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. debian/dirs0000644000000000000000000000001612260412773010053 0ustar usr/share/php debian/patches/0000755000000000000000000000000012260412773010621 5ustar debian/patches/000-add-complatibility-with-PHP54+E_ALL.diff0000644000000000000000000001142512260412773020145 0ustar Description: Add compatibility for PHP 5.4 using error_reporting(E_ALL) Author: Dario Minnucci Last-Update: 2012-04-27 Index: php-validate/Validate-0.8.5/Validate.php =================================================================== --- php-validate.orig/Validate-0.8.5/Validate.php 2012-04-27 04:06:26.192038726 +0200 +++ php-validate/Validate-0.8.5/Validate.php 2012-04-27 04:14:25.052951330 +0200 @@ -216,7 +216,7 @@ * * @access private */ - function __uriRFC4151($uri) + private static function __uriRFC4151($uri) { $datevalid = false; if (preg_match( @@ -257,7 +257,7 @@ * * @access public */ - function number($number, $options = array()) + public static function number($number, $options = array()) { $decimal = $dec_prec = $min = $max = null; if (is_array($options)) { @@ -295,7 +295,7 @@ * * @access private */ - function __stringToUtf7($string) + private static function __stringToUtf7($string) { $return = ''; $utf7 = array( @@ -373,7 +373,7 @@ * * @access private */ - function __emailRFC822(&$email, &$options) + private static function __emailRFC822(&$email, &$options) { static $address = null; static $uncomment = null; @@ -442,7 +442,7 @@ * * @return bool True if validating succeeds */ - function _fullTLDValidation($email, $options) + private static function _fullTLDValidation($email, $options) { $validate = array(); if(!empty($options["VALIDATE_ITLD_EMAILS"])) array_push($validate, 'itld'); @@ -481,7 +481,7 @@ * * @return true or false (Depending on if it validates or if it does not) */ - function executeFullEmailValidation($email, $arrayOfTLDs) + public static function executeFullEmailValidation($email, $arrayOfTLDs) { $emailEnding = explode('.', $email); $emailEnding = $emailEnding[count($emailEnding)-1]; @@ -516,7 +516,7 @@ * * @access public */ - function email($email, $options = null) + public static function email($email, $options = null) { $check_domain = false; $use_rfc822 = false; @@ -608,7 +608,7 @@ * * @access public */ - function string($string, $options) + public static function string($string, $options) { $format = null; $min_length = 0; @@ -670,7 +670,7 @@ * * @access public */ - function uri($url, $options = null) + public static function uri($url, $options = null) { $strict = ';/?:@$,'; $domain_check = false; @@ -746,7 +746,7 @@ * * @access public */ - function date($date, $options) + public static function date($date, $options) { $max = false; $min = false; @@ -929,7 +929,7 @@ * @access private * @return string */ - function _substr(&$date, $num, $opt = false) + private static function _substr(&$date, $num, $opt = false) { if ($opt && strlen($date) >= $opt && preg_match('/^[0-9]{'.$opt.'}/', $date, $m)) { $ret = $m[0]; @@ -940,7 +940,7 @@ return $ret; } - function _modf($val, $div) + private static function _modf($val, $div) { if (function_exists('bcmod')) { return bcmod($val, $div); @@ -993,7 +993,7 @@ * * @return int -1 calculated control number is returned */ - function _getControlNumber($number, &$weights, $modulo = 10, $subtract = 0, $allow_high = false) + private static function _getControlNumber($number, &$weights, $modulo = 10, $subtract = 0, $allow_high = false) { // calc sum $sum = Validate::_multWeights($number, $weights); @@ -1023,7 +1023,7 @@ * * @return bool true if valid, false if not */ - function _checkControlNumber($number, &$weights, $modulo = 10, $subtract = 0) + private static function _checkControlNumber($number, &$weights, $modulo = 10, $subtract = 0) { if (strlen($number) < count($weights)) { return false; @@ -1060,7 +1060,7 @@ * * @access public */ - function multiple(&$data, &$val_type, $remove = false) + public static function multiple(&$data, &$val_type, $remove = false) { $keys = array_keys($data); $valid = array(); @@ -1131,11 +1131,11 @@ * * @param string $filename file to search for * - * @access private + * @access public * * @return bool true if file exists */ - function _includePathFileExists($filename) + private static function _includePathFileExists($filename) { $paths = explode(":", ini_get("include_path")); $result = false; debian/patches/000-fix-validate-docs-sample-multiple.php.diff0000644000000000000000000000334212260412773021153 0ustar Description: Fix calls not supported for this package if no Validate_[LOCALE] are installed Author: Dario Minnucci Last-Update: 2012-04-27 Index: php-validate/Validate-0.8.5/docs/sample_multiple.php =================================================================== --- php-validate.orig/Validate-0.8.5/docs/sample_multiple.php 2012-04-27 02:09:03.919989214 +0200 +++ php-validate/Validate-0.8.5/docs/sample_multiple.php 2012-04-27 03:36:00.867068599 +0200 @@ -1,6 +1,6 @@ array('type'=>'number','decimal'=>',.','dec_prec'=>null,'min'=>1,'max'=>32000), 'name' => array('type'=>'email','check_domain'=>false), - 'rib' => array('type'=>'FR_rib'), - 'rib2' => array('type'=>'FR_rib'), - 'cc' => array('type'=>'Finance_CreditCard_number'), - 'cc2' => array('type'=>'Finance_CreditCard_number'), + //'rib' => array('type'=>'FR_rib'), + //'rib2' => array('type'=>'FR_rib'), + //'cc' => array('type'=>'Finance_CreditCard_number'), + //'cc2' => array('type'=>'Finance_CreditCard_number'), 'mail' => array('type'=>'email'), - 'hissiret' => array('type'=>'FR_siret'), + //'hissiret' => array('type'=>'FR_siret'), 'mystring' => array('type'=>'string',array('format'=>VALIDATE_ALPHA, 'min_length'=>3)), - 'iban' => array('type'=>'Finance_iban'), - 'cep' => array('type'=>'ptBR_postalcode') + //'iban' => array('type'=>'Finance_iban'), + //'cep' => array('type'=>'ptBR_postalcode') ); $result = Validate::multiple($values, $opts); debian/patches/series0000644000000000000000000000013412260412773012034 0ustar 000-fix-validate-docs-sample-multiple.php.diff 000-add-complatibility-with-PHP54+E_ALL.diff debian/source/0000755000000000000000000000000012260412773010472 5ustar debian/source/format0000644000000000000000000000001412260412773011700 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000016412260412773010224 0ustar version=3 http://pear.php.net/package/Validate/download http://download.pear.php.net/package/Validate-([\d.]+)\.tgz debian/rules0000755000000000000000000000013012260413221010231 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 %: dh $@ --buildsystem=phppear --with phppear debian/control0000644000000000000000000000165612260413370010577 0ustar Source: php-validate Section: php Priority: optional Maintainer: Dario Minnucci Build-Depends: debhelper (>= 9), pkg-php-tools Standards-Version: 3.9.5 Homepage: http://pear.php.net/package/Validate Vcs-Git: git://anonscm.debian.org/collab-maint/php-validate.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/php-validate.git Package: php-validate Architecture: all Depends: ${misc:Depends}, ${phppear:Debian-Depends} Recommends: ${phppear:Debian-Recommends} Breaks: ${phppear:Debian-Breaks} Description: validation class This package provides a PEAR package for validating data, including: * numbers (min/max, decimal or not); * email (syntax, domain check, RFC 822 compliance); * strings (predefined type alpha upper and/or lowercase, numeric, etc.); * dates (min/max, RFC 822 compliance); * URIs (RFC 2396 compliance). Multiple checks can be performed by a single method call (::multiple). debian/changelog0000644000000000000000000000137212260415224011041 0ustar php-validate (0.8.5-3) unstable; urgency=low * Package migrated to use pkg-php-tools. (Closes: #728904) * debian/control: - Bump Standards-Version to 3.9.5 (no changes) -- Dario Minnucci Tue, 31 Dec 2013 02:14:56 +0100 php-validate (0.8.5-2) unstable; urgency=low * debian/control: Package description improved. Thanks to Justin B Rye. (Closes: #672420) -- Dario Minnucci Mon, 28 May 2012 03:24:10 +0200 php-validate (0.8.5-1) unstable; urgency=low * Initial Release (Closes: #442350). * debian/patches: - Added 000-add-complatibility-with-PHP54+E_ALL.diff - Added 000-fix-validate-docs-sample-multiple.php.diff -- Dario Minnucci Fri, 27 Apr 2012 04:17:34 +0200