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
path: root/libs/Zend
diff options
context:
space:
mode:
authorrobocoder <anthon.pang@gmail.com>2011-07-21 06:12:37 +0400
committerrobocoder <anthon.pang@gmail.com>2011-07-21 06:12:37 +0400
commit9d8890ff20f1239e708d6d214f66dfa2cf3031e4 (patch)
tree9752e603d54629d4375c84e0478eab2aab19430b /libs/Zend
parent27f903dac205ff917305b9de5984c180782c4436 (diff)
fixes #2581
git-svn-id: http://dev.piwik.org/svn/trunk@5034 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'libs/Zend')
-rw-r--r--libs/Zend/Auth/Adapter/DbTable.php4
-rw-r--r--libs/Zend/Cache/Backend/File.php23
-rw-r--r--libs/Zend/Cache/Frontend/Class.php12
-rw-r--r--libs/Zend/Cache/Frontend/File.php4
-rw-r--r--libs/Zend/Config/Ini.php9
-rw-r--r--libs/Zend/Config/Xml.php18
-rwxr-xr-xlibs/Zend/Config/Yaml.php15
-rw-r--r--libs/Zend/Db/Adapter/Abstract.php4
-rw-r--r--libs/Zend/Db/Table/Abstract.php8
-rw-r--r--libs/Zend/Http/Client.php68
-rw-r--r--libs/Zend/Http/UserAgent/Mobile.php1
-rw-r--r--libs/Zend/Log/Formatter/Xml.php17
-rw-r--r--libs/Zend/Mail/Message.php4
-rw-r--r--libs/Zend/Session.php19
-rw-r--r--libs/Zend/Validate/EmailAddress.php5
-rw-r--r--libs/Zend/Version.php14
16 files changed, 142 insertions, 83 deletions
diff --git a/libs/Zend/Auth/Adapter/DbTable.php b/libs/Zend/Auth/Adapter/DbTable.php
index e7b6d7e793..19f8827e6f 100644
--- a/libs/Zend/Auth/Adapter/DbTable.php
+++ b/libs/Zend/Auth/Adapter/DbTable.php
@@ -17,7 +17,7 @@
* @subpackage Adapter
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: DbTable.php 23775 2011-03-01 17:25:24Z ralph $
+ * @version $Id: DbTable.php 24185 2011-07-05 13:10:05Z adamlundrigan $
*/
@@ -477,7 +477,7 @@ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface
$origDbFetchMode = $this->_zendDb->getFetchMode();
$this->_zendDb->setFetchMode(Zend_DB::FETCH_ASSOC);
}
- $resultIdentities = $this->_zendDb->fetchAll($dbSelect->__toString());
+ $resultIdentities = $this->_zendDb->fetchAll($dbSelect);
if (isset($origDbFetchMode)) {
$this->_zendDb->setFetchMode($origDbFetchMode);
unset($origDbFetchMode);
diff --git a/libs/Zend/Cache/Backend/File.php b/libs/Zend/Cache/Backend/File.php
index d76b17fd6a..5f0e1fee14 100644
--- a/libs/Zend/Cache/Backend/File.php
+++ b/libs/Zend/Cache/Backend/File.php
@@ -17,7 +17,7 @@
* @subpackage Zend_Cache_Backend
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: File.php 23775 2011-03-01 17:25:24Z ralph $
+ * @version $Id: File.php 24030 2011-05-09 22:10:00Z mabe $
*/
/**
@@ -268,14 +268,15 @@ class Zend_Cache_Backend_File extends Zend_Cache_Backend implements Zend_Cache_B
* Clean some cache records
*
* Available modes are :
- * 'all' (default) => remove all cache entries ($tags is not used)
- * 'old' => remove too old cache entries ($tags is not used)
- * 'matchingTag' => remove cache entries matching all given tags
- * ($tags can be an array of strings or a single string)
- * 'notMatchingTag' => remove cache entries not matching one of the given tags
- * ($tags can be an array of strings or a single string)
- * 'matchingAnyTag' => remove cache entries matching any given tags
- * ($tags can be an array of strings or a single string)
+ *
+ * Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used)
+ * Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used)
+ * Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given tags
+ * ($tags can be an array of strings or a single string)
+ * Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => remove cache entries not {matching one of the given tags}
+ * ($tags can be an array of strings or a single string)
+ * Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG => remove cache entries matching any given tags
+ * ($tags can be an array of strings or a single string)
*
* @param string $mode clean mode
* @param tags array $tags array of tags
@@ -722,8 +723,8 @@ class Zend_Cache_Backend_File extends Zend_Cache_Backend implements Zend_Cache_B
if ((is_dir($file)) and ($this->_options['hashed_directory_level']>0)) {
// Recursive call
$result = $this->_clean($file . DIRECTORY_SEPARATOR, $mode, $tags) && $result;
- if ($mode=='all') {
- // if mode=='all', we try to drop the structure too
+ if ($mode == Zend_Cache::CLEANING_MODE_ALL) {
+ // we try to drop the structure too
@rmdir($file);
}
}
diff --git a/libs/Zend/Cache/Frontend/Class.php b/libs/Zend/Cache/Frontend/Class.php
index 40f3c1ae8a..1b9b6b3f7d 100644
--- a/libs/Zend/Cache/Frontend/Class.php
+++ b/libs/Zend/Cache/Frontend/Class.php
@@ -17,7 +17,7 @@
* @subpackage Zend_Cache_Frontend
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Class.php 23775 2011-03-01 17:25:24Z ralph $
+ * @version $Id: Class.php 24032 2011-05-10 21:08:20Z mabe $
*/
/**
@@ -200,13 +200,19 @@ class Zend_Cache_Frontend_Class extends Zend_Cache_Core
*/
public function __call($name, $parameters)
{
+ $callback = array($this->_cachedEntity, $name);
+
+ if (!is_callable($callback, false)) {
+ Zend_Cache::throwException('Invalid callback');
+ }
+
$cacheBool1 = $this->_specificOptions['cache_by_default'];
$cacheBool2 = in_array($name, $this->_specificOptions['cached_methods']);
$cacheBool3 = in_array($name, $this->_specificOptions['non_cached_methods']);
$cache = (($cacheBool1 || $cacheBool2) && (!$cacheBool3));
if (!$cache) {
// We do not have not cache
- return call_user_func_array(array($this->_cachedEntity, $name), $parameters);
+ return call_user_func_array($callback, $parameters);
}
$id = $this->_makeId($name, $parameters);
@@ -220,7 +226,7 @@ class Zend_Cache_Frontend_Class extends Zend_Cache_Core
ob_implicit_flush(false);
try {
- $return = call_user_func_array(array($this->_cachedEntity, $name), $parameters);
+ $return = call_user_func_array($callback, $parameters);
$output = ob_get_clean();
$data = array($output, $return);
$this->save($data, $id, $this->_tags, $this->_specificLifetime, $this->_priority);
diff --git a/libs/Zend/Cache/Frontend/File.php b/libs/Zend/Cache/Frontend/File.php
index fe55dc7383..cfaf511425 100644
--- a/libs/Zend/Cache/Frontend/File.php
+++ b/libs/Zend/Cache/Frontend/File.php
@@ -17,7 +17,7 @@
* @subpackage Zend_Cache_Frontend
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: File.php 23793 2011-03-02 22:31:05Z mabe $
+ * @version $Id: File.php 24218 2011-07-10 01:22:58Z ramon $
*/
@@ -123,7 +123,7 @@ class Zend_Cache_Frontend_File extends Zend_Cache_Core
$this->_masterFile_mtimes[$i] = $mtime;
$this->_specificOptions['master_files'][$i] = $masterFile;
if ($i === 0) { // to keep a compatibility
- $this->_specificOptions['master_files'] = $masterFile;
+ $this->_specificOptions['master_file'] = $masterFile;
}
$i++;
diff --git a/libs/Zend/Config/Ini.php b/libs/Zend/Config/Ini.php
index 6e05fc7ec2..cd06ddccde 100644
--- a/libs/Zend/Config/Ini.php
+++ b/libs/Zend/Config/Ini.php
@@ -16,7 +16,7 @@
* @package Zend_Config
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Ini.php 23775 2011-03-01 17:25:24Z ralph $
+ * @version $Id: Ini.php 24045 2011-05-23 12:45:11Z rob $
*/
@@ -83,16 +83,17 @@ class Zend_Config_Ini extends Zend_Config
*
* The $options parameter may be provided as either a boolean or an array.
* If provided as a boolean, this sets the $allowModifications option of
- * Zend_Config. If provided as an array, there are two configuration
+ * Zend_Config. If provided as an array, there are three configuration
* directives that may be set. For example:
*
* $options = array(
* 'allowModifications' => false,
- * 'nestSeparator' => '->'
+ * 'nestSeparator' => ':',
+ * 'skipExtends' => false,
* );
*
* @param string $filename
- * @param string|null $section
+ * @param mixed $section
* @param boolean|array $options
* @throws Zend_Config_Exception
* @return void
diff --git a/libs/Zend/Config/Xml.php b/libs/Zend/Config/Xml.php
index a013ecc26c..1819276ddd 100644
--- a/libs/Zend/Config/Xml.php
+++ b/libs/Zend/Config/Xml.php
@@ -16,7 +16,7 @@
* @package Zend_Config
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Xml.php 23775 2011-03-01 17:25:24Z ralph $
+ * @version $Id: Xml.php 24045 2011-05-23 12:45:11Z rob $
*/
/**
@@ -58,10 +58,20 @@ class Zend_Config_Xml extends Zend_Config
*
* Note that the keys in $section will override any keys of the same
* name in the sections that have been included via "extends".
+ *
+ * The $options parameter may be provided as either a boolean or an array.
+ * If provided as a boolean, this sets the $allowModifications option of
+ * Zend_Config. If provided as an array, there are two configuration
+ * directives that may be set. For example:
*
- * @param string $xml XML file or string to process
- * @param mixed $section Section to process
- * @param boolean $options Whether modifications are allowed at runtime
+ * $options = array(
+ * 'allowModifications' => false,
+ * 'skipExtends' => false
+ * );
+ *
+ * @param string $xml XML file or string to process
+ * @param mixed $section Section to process
+ * @param array|boolean $options
* @throws Zend_Config_Exception When xml is not set or cannot be loaded
* @throws Zend_Config_Exception When section $sectionName cannot be found in $xml
*/
diff --git a/libs/Zend/Config/Yaml.php b/libs/Zend/Config/Yaml.php
index e9fe719f59..bda81d0565 100755
--- a/libs/Zend/Config/Yaml.php
+++ b/libs/Zend/Config/Yaml.php
@@ -16,7 +16,7 @@
* @package Zend_Config
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Yaml.php 23952 2011-05-03 05:45:06Z ralph $
+ * @version $Id: Yaml.php 24092 2011-05-31 02:43:28Z adamlundrigan $
*/
/**
@@ -124,9 +124,9 @@ class Zend_Config_Yaml extends Zend_Config
* - skip_extends: whether or not to skip processing of parent configuration
* - yaml_decoder: a callback to use to decode the Yaml source
*
- * @param string $yaml YAML file to process
- * @param mixed $section Section to process
- * @param boolean $options Whether modifiacations are allowed at runtime
+ * @param string $yaml YAML file to process
+ * @param mixed $section Section to process
+ * @param array|boolean $options
*/
public function __construct($yaml, $section = null, $options = false)
{
@@ -285,13 +285,12 @@ class Zend_Config_Yaml extends Zend_Config
$inIndent = false;
while (list($n, $line) = each($lines)) {
$lineno = $n + 1;
+
+ $line = rtrim(preg_replace("/#.*$/", "", $line));
if (strlen($line) == 0) {
continue;
}
- if ($line[0] == '#') {
- // comment
- continue;
- }
+
$indent = strspn($line, " ");
// line without the spaces
diff --git a/libs/Zend/Db/Adapter/Abstract.php b/libs/Zend/Db/Adapter/Abstract.php
index 0298be00df..d65d4b2b6a 100644
--- a/libs/Zend/Db/Adapter/Abstract.php
+++ b/libs/Zend/Db/Adapter/Abstract.php
@@ -17,7 +17,7 @@
* @subpackage Adapter
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Abstract.php 23775 2011-03-01 17:25:24Z ralph $
+ * @version $Id: Abstract.php 24148 2011-06-21 15:14:00Z yoshida@zend.co.jp $
*/
@@ -531,6 +531,7 @@ abstract class Zend_Db_Adapter_Abstract
* @param mixed $table The table to insert data into.
* @param array $bind Column-value pairs.
* @return int The number of affected rows.
+ * @throws Zend_Db_Adapter_Exception
*/
public function insert($table, array $bind)
{
@@ -583,6 +584,7 @@ abstract class Zend_Db_Adapter_Abstract
* @param array $bind Column-value pairs.
* @param mixed $where UPDATE WHERE clause(s).
* @return int The number of affected rows.
+ * @throws Zend_Db_Adapter_Exception
*/
public function update($table, array $bind, $where = '')
{
diff --git a/libs/Zend/Db/Table/Abstract.php b/libs/Zend/Db/Table/Abstract.php
index f3f6c452af..6949a61601 100644
--- a/libs/Zend/Db/Table/Abstract.php
+++ b/libs/Zend/Db/Table/Abstract.php
@@ -17,7 +17,7 @@
* @subpackage Table
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Abstract.php 23994 2011-05-04 06:09:42Z ralph $
+ * @version $Id: Abstract.php 24148 2011-06-21 15:14:00Z yoshida@zend.co.jp $
*/
/**
@@ -267,8 +267,6 @@ abstract class Zend_Db_Table_Abstract
$this->_setup();
$this->init();
-
- $this->_metadata = array();
}
/**
@@ -746,6 +744,7 @@ abstract class Zend_Db_Table_Abstract
* Initialize database adapter.
*
* @return void
+ * @throws Zend_Db_Table_Exception
*/
protected function _setupDatabaseAdapter()
{
@@ -976,6 +975,7 @@ abstract class Zend_Db_Table_Abstract
*
* @param string $key The specific info part to return OPTIONAL
* @return mixed
+ * @throws Zend_Db_Table_Exception
*/
public function info($key = null)
{
@@ -1054,7 +1054,7 @@ abstract class Zend_Db_Table_Abstract
/**
* If the primary key can be generated automatically, and no value was
* specified in the user-supplied data, then omit it from the tuple.
- *
+ *
* Note: this checks for sensible values in the supplied primary key
* position of the data. The following values are considered empty:
* null, false, true, '', array()
diff --git a/libs/Zend/Http/Client.php b/libs/Zend/Http/Client.php
index fa9aa0b663..f3e7a31e92 100644
--- a/libs/Zend/Http/Client.php
+++ b/libs/Zend/Http/Client.php
@@ -16,7 +16,7 @@
* @category Zend
* @package Zend_Http
* @subpackage Client
- * @version $Id: Client.php 23864 2011-04-19 16:14:07Z shahar $
+ * @version $Id: Client.php 24194 2011-07-05 15:53:45Z matthew $
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@@ -101,6 +101,12 @@ class Zend_Http_Client
*/
const ENC_URLENCODED = 'application/x-www-form-urlencoded';
const ENC_FORMDATA = 'multipart/form-data';
+
+ /**
+ * Value types for Body key/value pairs
+ */
+ const VTYPE_SCALAR = 'SCALAR';
+ const VTYPE_FILE = 'FILE';
/**
* Configuration array, set using the constructor or using ::setConfig()
@@ -201,6 +207,16 @@ class Zend_Http_Client
* @var array
*/
protected $files = array();
+
+ /**
+ * Ordered list of keys from key/value pair data to include in body
+ *
+ * An associative array, where each element is of the format:
+ * '<field name>' => VTYPE_SCALAR | VTYPE_FILE
+ *
+ * @var array
+ */
+ protected $body_field_order = array();
/**
* The client's cookie jar
@@ -501,6 +517,12 @@ class Zend_Http_Client
break;
case 'post':
$parray = &$this->paramsPost;
+ if ( $value === null ) {
+ if (isset($this->body_field_order[$name]))
+ unset($this->body_field_order[$name]);
+ } else {
+ $this->body_field_order[$name] = self::VTYPE_SCALAR;
+ }
break;
}
@@ -724,6 +746,8 @@ class Zend_Http_Client
'ctype' => $ctype,
'data' => $data
);
+
+ $this->body_field_order[$formname] = self::VTYPE_FILE;
return $this;
}
@@ -788,7 +812,8 @@ class Zend_Http_Client
$this->paramsPost = array();
$this->files = array();
$this->raw_post_data = null;
-
+ $this->enctype = null;
+
if($clearAll) {
$this->headers = array();
$this->last_request = null;
@@ -1211,16 +1236,37 @@ class Zend_Http_Client
$boundary = '---ZENDHTTPCLIENT-' . md5(microtime());
$this->setHeaders(self::CONTENT_TYPE, self::ENC_FORMDATA . "; boundary={$boundary}");
- // Get POST parameters and encode them
- $params = self::_flattenParametersArray($this->paramsPost);
- foreach ($params as $pp) {
- $body .= self::encodeFormData($boundary, $pp[0], $pp[1]);
+ // Map the formname of each file to the array index it is stored in
+ $fileIndexMap = array();
+ foreach ($this->files as $key=>$fdata ) {
+ $fileIndexMap[$fdata['formname']] = $key;
}
-
- // Encode files
- foreach ($this->files as $file) {
- $fhead = array(self::CONTENT_TYPE => $file['ctype']);
- $body .= self::encodeFormData($boundary, $file['formname'], $file['data'], $file['filename'], $fhead);
+
+ // Encode all files and POST vars in the order they were given
+ foreach ($this->body_field_order as $fieldName=>$fieldType) {
+ switch ($fieldType) {
+ case self::VTYPE_FILE:
+ if (isset($fileIndexMap[$fieldName])) {
+ if (isset($this->files[$fileIndexMap[$fieldName]])) {
+ $file = $this->files[$fileIndexMap[$fieldName]];
+ $fhead = array(self::CONTENT_TYPE => $file['ctype']);
+ $body .= self::encodeFormData($boundary, $file['formname'], $file['data'], $file['filename'], $fhead);
+ }
+ }
+ break;
+ case self::VTYPE_SCALAR:
+ if (isset($this->paramsPost[$fieldName])) {
+ if (is_array($this->paramsPost[$fieldName])) {
+ $flattened = self::_flattenParametersArray($this->paramsPost[$fieldName], $fieldName);
+ foreach ($flattened as $pp) {
+ $body .= self::encodeFormData($boundary, $pp[0], $pp[1]);
+ }
+ } else {
+ $body .= self::encodeFormData($boundary, $fieldName, $this->paramsPost[$fieldName]);
+ }
+ }
+ break;
+ }
}
$body .= "--{$boundary}--\r\n";
diff --git a/libs/Zend/Http/UserAgent/Mobile.php b/libs/Zend/Http/UserAgent/Mobile.php
index c2498bbebf..fe27388238 100644
--- a/libs/Zend/Http/UserAgent/Mobile.php
+++ b/libs/Zend/Http/UserAgent/Mobile.php
@@ -111,7 +111,6 @@ class Zend_Http_UserAgent_Mobile extends Zend_Http_UserAgent_AbstractDevice
'novarra-vision',
'nuvifone',
'openweb',
- 'oper',
'opwv',
'palmsource',
'pdxgw',
diff --git a/libs/Zend/Log/Formatter/Xml.php b/libs/Zend/Log/Formatter/Xml.php
index 7df86e077d..09ea50170e 100644
--- a/libs/Zend/Log/Formatter/Xml.php
+++ b/libs/Zend/Log/Formatter/Xml.php
@@ -17,7 +17,7 @@
* @subpackage Formatter
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Xml.php 23981 2011-05-03 19:01:03Z ralph $
+ * @version $Id: Xml.php 24237 2011-07-13 18:22:20Z matthew $
*/
/** Zend_Log_Formatter_Abstract */
@@ -29,7 +29,7 @@
* @subpackage Formatter
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Xml.php 23981 2011-05-03 19:01:03Z ralph $
+ * @version $Id: Xml.php 24237 2011-07-13 18:22:20Z matthew $
*/
class Zend_Log_Formatter_Xml extends Zend_Log_Formatter_Abstract
{
@@ -146,10 +146,15 @@ class Zend_Log_Formatter_Xml extends Zend_Log_Formatter_Abstract
$elt = $dom->appendChild(new DOMElement($this->_rootElement));
foreach ($dataToInsert as $key => $value) {
- if($key == "message") {
- $value = htmlspecialchars($value, ENT_COMPAT, $enc);
+ if (empty($value)
+ || is_scalar($value)
+ || (is_object($value) && method_exists($value,'__toString'))
+ ) {
+ if($key == "message") {
+ $value = htmlspecialchars($value, ENT_COMPAT, $enc);
+ }
+ $elt->appendChild(new DOMElement($key, (string)$value));
}
- $elt->appendChild(new DOMElement($key, $value));
}
$xml = $dom->saveXML();
@@ -157,4 +162,4 @@ class Zend_Log_Formatter_Xml extends Zend_Log_Formatter_Abstract
return $xml . PHP_EOL;
}
-} \ No newline at end of file
+}
diff --git a/libs/Zend/Mail/Message.php b/libs/Zend/Mail/Message.php
index 9ae6acb11b..0b184d219d 100644
--- a/libs/Zend/Mail/Message.php
+++ b/libs/Zend/Mail/Message.php
@@ -16,7 +16,7 @@
* @package Zend_Mail
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Message.php 23775 2011-03-01 17:25:24Z ralph $
+ * @version $Id: Message.php 24163 2011-06-29 15:24:10Z adamlundrigan $
*/
@@ -73,7 +73,7 @@ class Zend_Mail_Message extends Zend_Mail_Part implements Zend_Mail_Message_Inte
if (!empty($params['flags'])) {
// set key and value to the same value for easy lookup
- $this->_flags = array_combine($params['flags'], $params['flags']);
+ $this->_flags = array_merge($this->_flags, array_combine($params['flags'],$params['flags']));
}
parent::__construct($params);
diff --git a/libs/Zend/Session.php b/libs/Zend/Session.php
index 59c3980362..bbf8c1cc94 100644
--- a/libs/Zend/Session.php
+++ b/libs/Zend/Session.php
@@ -17,7 +17,7 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Session.php 23955 2011-05-03 09:58:12Z yoshida@zend.co.jp $
+ * @version $Id: Session.php 24196 2011-07-05 15:58:11Z matthew $
* @since Preview Release 0.2
*/
@@ -308,24 +308,13 @@ class Zend_Session extends Zend_Session_Abstract
"() before any output has been sent to the browser; output started in {$filename}/{$linenum}");
}
- if (self::$_sessionStarted && self::$_regenerateIdState <= 0) {
+ if ( !self::$_sessionStarted ) {
+ self::$_regenerateIdState = -1;
+ } else {
if (!self::$_unitTestEnabled) {
session_regenerate_id(true);
}
self::$_regenerateIdState = 1;
- } else {
- /**
- * @todo If we can detect that this requester had no session previously,
- * then why regenerate the id before the session has started?
- * Feedback wanted for:
- //
- if (isset($_COOKIE[session_name()]) || (!use only cookies && isset($_REQUEST[session_name()]))) {
- self::$_regenerateIdState = 1;
- } else {
- self::$_regenerateIdState = -1;
- }
- //*/
- self::$_regenerateIdState = -1;
}
}
diff --git a/libs/Zend/Validate/EmailAddress.php b/libs/Zend/Validate/EmailAddress.php
index dba6e286ce..6cc567daea 100644
--- a/libs/Zend/Validate/EmailAddress.php
+++ b/libs/Zend/Validate/EmailAddress.php
@@ -16,7 +16,7 @@
* @package Zend_Validate
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: EmailAddress.php 23775 2011-03-01 17:25:24Z ralph $
+ * @version $Id: EmailAddress.php 24125 2011-06-07 16:13:26Z adamlundrigan $
*/
/**
@@ -527,8 +527,9 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract
$this->_setValue($value);
// Split email address up and disallow '..'
+ // and disallow addresses ending with a '.'
if ((strpos($value, '..') !== false) or
- (!preg_match('/^(.+)@([^@]+)$/', $value, $matches))) {
+ (!preg_match('/^(.+)@([^@]+[^.])$/', $value, $matches))) {
$this->_error(self::INVALID_FORMAT);
return false;
}
diff --git a/libs/Zend/Version.php b/libs/Zend/Version.php
index 83ef742e78..a34e2c14a3 100644
--- a/libs/Zend/Version.php
+++ b/libs/Zend/Version.php
@@ -16,7 +16,7 @@
* @package Zend_Version
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Version.php 24016 2011-05-05 16:18:45Z matthew $
+ * @version $Id: Version.php 24230 2011-07-13 17:44:57Z matthew $
*/
/**
@@ -32,14 +32,14 @@ final class Zend_Version
/**
* Zend Framework version identification - see compareVersion()
*/
- const VERSION = '1.11.6';
+ const VERSION = '1.11.9';
/**
* The latest stable version Zend Framework available
*
* @var string
*/
- protected static $_lastestVersion;
+ protected static $_latestVersion;
/**
* Compare the specified Zend Framework version string $version
@@ -66,16 +66,16 @@ final class Zend_Version
*/
public static function getLatest()
{
- if (null === self::$_lastestVersion) {
- self::$_lastestVersion = 'not available';
+ if (null === self::$_latestVersion) {
+ self::$_latestVersion = 'not available';
$handle = fopen('http://framework.zend.com/api/zf-version', 'r');
if (false !== $handle) {
- self::$_lastestVersion = stream_get_contents($handle);
+ self::$_latestVersion = stream_get_contents($handle);
fclose($handle);
}
}
- return self::$_lastestVersion;
+ return self::$_latestVersion;
}
}