Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobocoder <anthon.pang@gmail.com>2010-02-25 17:10:10 +0300
committerrobocoder <anthon.pang@gmail.com>2010-02-25 17:10:10 +0300
commitc8a35bf02ea4baae4afbcab15ce91a281283addc (patch)
treeba08eb51535b4315fdf16e04fad533ea30b31836 /libs/Zend/Validate
parentad1a84e911b89f9506b4f4ca1829ef8055784459 (diff)
fixes #1175 - update to ZF 1.10.2
git-svn-id: http://dev.piwik.org/svn/trunk@1870 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'libs/Zend/Validate')
-rw-r--r--libs/Zend/Validate/Digits.php4
-rw-r--r--libs/Zend/Validate/EmailAddress.php7
-rw-r--r--libs/Zend/Validate/File/IsCompressed.php40
-rw-r--r--libs/Zend/Validate/File/IsImage.php68
-rw-r--r--libs/Zend/Validate/Hostname.php8
-rw-r--r--libs/Zend/Validate/PostCode.php3
6 files changed, 94 insertions, 36 deletions
diff --git a/libs/Zend/Validate/Digits.php b/libs/Zend/Validate/Digits.php
index d6528dde01..6439d37e05 100644
--- a/libs/Zend/Validate/Digits.php
+++ b/libs/Zend/Validate/Digits.php
@@ -16,7 +16,7 @@
* @package Zend_Validate
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Digits.php 20096 2010-01-06 02:05:09Z bkarwin $
+ * @version $Id: Digits.php 21136 2010-02-22 22:30:50Z thomas $
*/
/**
@@ -49,7 +49,7 @@ class Zend_Validate_Digits extends Zend_Validate_Abstract
* @var array
*/
protected $_messageTemplates = array(
- self::NOT_DIGITS => "'%value%' contains not only digit characters",
+ self::NOT_DIGITS => "'%value%' contains characters which are not digits; but only digits are allowed",
self::STRING_EMPTY => "'%value%' is an empty string",
self::INVALID => "Invalid type given, value should be string, integer or float",
);
diff --git a/libs/Zend/Validate/EmailAddress.php b/libs/Zend/Validate/EmailAddress.php
index dd426cd492..ff5630e108 100644
--- a/libs/Zend/Validate/EmailAddress.php
+++ b/libs/Zend/Validate/EmailAddress.php
@@ -16,7 +16,7 @@
* @package Zend_Validate
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: EmailAddress.php 20910 2010-02-04 19:36:26Z thomas $
+ * @version $Id: EmailAddress.php 21083 2010-02-18 19:29:20Z thomas $
*/
/**
@@ -441,10 +441,9 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract
*/
private function _validateMXRecords()
{
- $result = true;
$mxHosts = array();
- getmxrr($this->_hostname, $mxHosts);
- if ($this->_options['deep'] && function_exists('checkdnsrr')) {
+ $result = getmxrr($this->_hostname, $mxHosts);
+ if ($result && $this->_options['deep'] && function_exists('checkdnsrr')) {
$validAddress = false;
$reserved = true;
foreach ($mxHosts as $hostname) {
diff --git a/libs/Zend/Validate/File/IsCompressed.php b/libs/Zend/Validate/File/IsCompressed.php
index d2b8a25430..3b7983f264 100644
--- a/libs/Zend/Validate/File/IsCompressed.php
+++ b/libs/Zend/Validate/File/IsCompressed.php
@@ -16,7 +16,7 @@
* @package Zend_Validate
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: IsCompressed.php 20358 2010-01-17 19:03:49Z thomas $
+ * @version $Id: IsCompressed.php 21138 2010-02-22 22:37:11Z thomas $
*/
/**
@@ -63,23 +63,39 @@ class Zend_Validate_File_IsCompressed extends Zend_Validate_File_MimeType
}
$temp = array();
- $default = array(
- 'application/x-tar',
- 'application/x-cpio',
- 'application/x-debian-package',
- 'application/x-archive',
+ // http://de.wikipedia.org/wiki/Liste_von_Dateiendungen
+ $default = array(
+ 'application/arj',
+ 'application/gnutar',
+ 'application/lha',
+ 'application/lzx',
+ 'application/vnd.ms-cab-compressed',
+ 'application/x-ace-compressed',
'application/x-arc',
+ 'application/x-archive',
'application/x-arj',
- 'application/x-lharc',
+ 'application/x-bzip',
+ 'application/x-bzip2',
+ 'application/x-cab-compressed',
+ 'application/x-compress',
+ 'application/x-compressed',
+ 'application/x-cpio',
+ 'application/x-debian-package',
+ 'application/x-eet',
+ 'application/x-gzip',
+ 'application/x-java-pack200',
'application/x-lha',
+ 'application/x-lharc',
+ 'application/x-lzh',
+ 'application/x-lzma',
+ 'application/x-lzx',
'application/x-rar',
+ 'application/x-sit',
+ 'application/x-stuffit',
+ 'application/x-tar',
'application/zip',
'application/zoo',
- 'application/x-eet',
- 'application/x-java-pack200',
- 'application/x-compress',
- 'application/x-gzip',
- 'application/x-bzip2'
+ 'multipart/x-gzip',
);
if (is_array($mimetype)) {
diff --git a/libs/Zend/Validate/File/IsImage.php b/libs/Zend/Validate/File/IsImage.php
index 77756277f0..cfff3e3c55 100644
--- a/libs/Zend/Validate/File/IsImage.php
+++ b/libs/Zend/Validate/File/IsImage.php
@@ -16,7 +16,7 @@
* @package Zend_Validate
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: IsImage.php 20358 2010-01-17 19:03:49Z thomas $
+ * @version $Id: IsImage.php 21138 2010-02-22 22:37:11Z thomas $
*/
/**
@@ -46,7 +46,7 @@ class Zend_Validate_File_IsImage extends Zend_Validate_File_MimeType
*/
protected $_messageTemplates = array(
self::FALSE_TYPE => "File '%value%' is no image, '%type%' detected",
- self::NOT_DETECTED => "The mimetype of file '%value%' could not been detected",
+ self::NOT_DETECTED => "The mimetype of file '%value%' could not be detected",
self::NOT_READABLE => "File '%value%' can not be read",
);
@@ -63,27 +63,63 @@ class Zend_Validate_File_IsImage extends Zend_Validate_File_MimeType
}
$temp = array();
+ // http://de.wikipedia.org/wiki/Liste_von_Dateiendungen
+ // http://www.iana.org/assignments/media-types/image/
$default = array(
- 'image/x-quicktime',
+ 'application/cdf',
+ 'application/dicom',
+ 'application/fractals',
+ 'application/postscript',
+ 'application/vnd.hp-hpgl',
+ 'application/vnd.oasis.opendocument.graphics',
+ 'application/x-cdf',
+ 'application/x-cmu-raster',
+ 'application/x-ima',
+ 'application/x-inventor',
+ 'application/x-koan',
+ 'application/x-portable-anymap',
+ 'application/x-world-x-3dmf',
+ 'image/bmp',
+ 'image/c',
+ 'image/cgm',
+ 'image/fif',
+ 'image/gif',
+ 'image/jpeg',
+ 'image/jpm',
+ 'image/jpx',
'image/jp2',
- 'image/x-xpmi',
- 'image/x-portable-bitmap',
- 'image/x-portable-greymap',
- 'image/x-portable-pixmap',
- 'image/x-niff',
- 'image/tiff',
+ 'image/naplps',
+ 'image/pjpeg',
'image/png',
- 'image/x-unknown',
- 'image/gif',
- 'image/x-ms-bmp',
- 'application/dicom',
+ 'image/svg',
+ 'image/svg+xml',
+ 'image/tiff',
'image/vnd.adobe.photoshop',
'image/vnd.djvu',
+ 'image/vnd.fpx',
+ 'image/vnd.net-fpx',
+ 'image/x-cmu-raster',
+ 'image/x-cmx',
+ 'image/x-coreldraw',
'image/x-cpi',
- 'image/jpeg',
+ 'image/x-emf',
'image/x-ico',
- 'image/x-coreldraw',
- 'image/svg+xml'
+ 'image/x-icon',
+ 'image/x-jg',
+ 'image/x-ms-bmp',
+ 'image/x-niff',
+ 'image/x-pict',
+ 'image/x-pcx',
+ 'image/x-portable-anymap',
+ 'image/x-portable-bitmap',
+ 'image/x-portable-greymap',
+ 'image/x-portable-pixmap',
+ 'image/x-quicktime',
+ 'image/x-rgb',
+ 'image/x-tiff',
+ 'image/x-unknown',
+ 'image/x-windows-bmp',
+ 'image/x-xpmi',
);
if (is_array($mimetype)) {
diff --git a/libs/Zend/Validate/Hostname.php b/libs/Zend/Validate/Hostname.php
index 04f656dab8..3199767b76 100644
--- a/libs/Zend/Validate/Hostname.php
+++ b/libs/Zend/Validate/Hostname.php
@@ -16,7 +16,7 @@
* @package Zend_Validate
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Hostname.php 20358 2010-01-17 19:03:49Z thomas $
+ * @version $Id: Hostname.php 21063 2010-02-15 23:00:17Z thomas $
*/
/**
@@ -200,6 +200,12 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
'DE' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťţŧŭůűũųūŵŷźžż]{1,63}$/iu'),
'DK' => array(1 => '/^[\x{002d}0-9a-zäéöü]{1,63}$/iu'),
'ES' => array(1 => '/^[\x{002d}0-9a-zàáçèéíïñòóúü·]{1,63}$/iu'),
+ 'EU' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿ]{1,63}$/iu',
+ 2 => '/^[\x{002d}0-9a-zāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőœŕŗřśŝšťŧũūŭůűųŵŷźżž]{1,63}$/iu',
+ 3 => '/^[\x{002d}0-9a-zșț]{1,63}$/iu',
+ 4 => '/^[\x{002d}0-9a-zΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ]{1,63}$/iu',
+ 5 => '/^[\x{002d}0-9a-zабвгдежзийклмнопрстуфхцчшщъыьэюя]{1,63}$/iu',
+ 6 => '/^[\x{002d}0-9a-zἀ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷῂῃῄῆῇῐ-ΐῖῗῠ-ῧῲῳῴῶῷ]{1,63}$/iu'),
'FI' => array(1 => '/^[\x{002d}0-9a-zäåö]{1,63}$/iu'),
'GR' => array(1 => '/^[\x{002d}0-9a-zΆΈΉΊΌΎ-ΡΣ-ώἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼῂῃῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲῳῴῶ-ῼ]{1,63}$/iu'),
'HK' => 'Zend/Validate/Hostname/Cn.php',
diff --git a/libs/Zend/Validate/PostCode.php b/libs/Zend/Validate/PostCode.php
index 5892009ab5..b6bafe0f93 100644
--- a/libs/Zend/Validate/PostCode.php
+++ b/libs/Zend/Validate/PostCode.php
@@ -16,7 +16,7 @@
* @package Zend_Validate
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: PostCode.php 20532 2010-01-22 20:18:23Z thomas $
+ * @version $Id: PostCode.php 21107 2010-02-19 21:40:22Z thomas $
*/
/**
@@ -193,6 +193,7 @@ class Zend_Validate_PostCode extends Zend_Validate_Abstract
*/
public function isValid($value)
{
+ $this->_setValue($value);
if (!is_string($value) && !is_int($value)) {
$this->_error(self::INVALID);
return false;