MINOR Upgraded Zend framework dependency from 1.11.6 to 1.11.11

This commit is contained in:
Ingo Schommer 2012-02-10 23:10:29 +01:00
parent 243d4d45aa
commit d912da4ed5
11 changed files with 54 additions and 36 deletions

View File

@ -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);
}
}

View File

@ -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: Sqlite.php 23775 2011-03-01 17:25:24Z ralph $
* @version $Id: Sqlite.php 24348 2011-08-04 17:51:24Z mabe $
*/
@ -530,7 +530,6 @@ class Zend_Cache_Backend_Sqlite extends Zend_Cache_Backend implements Zend_Cache
$rand = rand(1, $this->_options['automatic_vacuum_factor']);
if ($rand == 1) {
$this->_query('VACUUM');
@sqlite_close($this->_getConnection());
}
}
}

View File

@ -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: TwoLevels.php 23775 2011-03-01 17:25:24Z ralph $
* @version $Id: TwoLevels.php 24254 2011-07-22 12:04:41Z mabe $
*/
@ -383,7 +383,6 @@ class Zend_Cache_Backend_TwoLevels extends Zend_Cache_Backend implements Zend_Ca
return $this->_slowBackend->getIdsMatchingAnyTags($tags);
}
/**
* Return the filling percentage of the backend storage
*
@ -481,18 +480,19 @@ class Zend_Cache_Backend_TwoLevels extends Zend_Cache_Backend implements Zend_Ca
*/
private function _getFastLifetime($lifetime, $priority, $maxLifetime = null)
{
if ($lifetime === null) {
// if lifetime is null, we have an infinite lifetime
if ($lifetime <= 0) {
// if no lifetime, we have an infinite lifetime
// we need to use arbitrary lifetimes
$fastLifetime = (int) (2592000 / (11 - $priority));
} else {
$fastLifetime = (int) ($lifetime / (11 - $priority));
// prevent computed infinite lifetime (0) by ceil
$fastLifetime = (int) ceil($lifetime / (11 - $priority));
}
if (($maxLifetime !== null) && ($maxLifetime >= 0)) {
if ($fastLifetime > $maxLifetime) {
return $maxLifetime;
}
if ($maxLifetime >= 0 && $fastLifetime > $maxLifetime) {
return $maxLifetime;
}
return $fastLifetime;
}

0
thirdparty/Zend/Cache/Backend/ZendServer.php vendored Normal file → Executable file
View File

0
thirdparty/Zend/Cache/Backend/ZendServer/Disk.php vendored Normal file → Executable file
View File

0
thirdparty/Zend/Cache/Backend/ZendServer/ShMem.php vendored Normal file → Executable file
View File

View File

@ -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);

View File

@ -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++;

View File

@ -16,7 +16,7 @@
* @package Zend_Date
* @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: Date.php 23775 2011-03-01 17:25:24Z ralph $
* @version $Id: Date.php 24108 2011-06-04 00:09:27Z freak $
*/
/**
@ -2107,7 +2107,10 @@ class Zend_Date extends Zend_Date_DateObject
break;
case self::RFC_2822:
$result = preg_match('/^\w{3},\s(\d{1,2})\s(\w{3})\s(\d{4})\s(\d{2}):(\d{2}):{0,1}(\d{0,2})\s([+-]{1}\d{4})$/', $date, $match);
$result = preg_match('/^\w{3},\s(\d{1,2})\s(\w{3})\s(\d{4})\s'
. '(\d{2}):(\d{2}):{0,1}(\d{0,2})\s([+-]'
. '{1}\d{4}|\w{1,20})$/', $date, $match);
if (!$result) {
require_once 'Zend/Date/Exception.php';
throw new Zend_Date_Exception("no RFC 2822 format ($date)", 0, null, $date);

View File

@ -17,7 +17,7 @@
* @subpackage Data
* @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: Data.php 23775 2011-03-01 17:25:24Z ralph $
* @version $Id: Data.php 24140 2011-06-14 02:11:19Z adamlundrigan $
*/
/**
@ -1139,6 +1139,10 @@ class Zend_Locale_Data
$temp = self::_getFile($locale, '/ldml/dates/calendars/calendar[@type=\'' . $value[0] . '\']/fields/field/relative[@type=\'' . $value[1] . '\']', '', $value[1]);
break;
case 'defaultnumberingsystem':
$temp = self::_getFile($locale, '/ldml/numbers/defaultNumberingSystem', '', 'default');
break;
case 'decimalnumber':
$temp = self::_getFile($locale, '/ldml/numbers/decimalFormats/decimalFormatLength/decimalFormat/pattern', '', 'default');
break;

View File

@ -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 @@ require_once 'Zend/Log/Formatter/Abstract.php';
* @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;
}
}
}