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-04-08 06:38:20 +0400
committerrobocoder <anthon.pang@gmail.com>2011-04-08 06:38:20 +0400
commitf752716d8e30a73eb5d12eda40646b09d00eb983 (patch)
treea7f9ccb9c70ed271159bce503ab6bd6075f24611 /libs/Zend
parent5a07cbfff82f6069b87e2dc1c2ea4cf17f4e4a8a (diff)
fixes #2282
git-svn-id: http://dev.piwik.org/svn/trunk@4368 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'libs/Zend')
-rw-r--r--libs/Zend/Cache/Backend.php4
-rw-r--r--libs/Zend/Cache/Core.php45
-rw-r--r--libs/Zend/Cache/Frontend/File.php8
-rwxr-xr-xlibs/Zend/Config/Yaml.php6
-rw-r--r--libs/Zend/Version.php4
5 files changed, 40 insertions, 27 deletions
diff --git a/libs/Zend/Cache/Backend.php b/libs/Zend/Cache/Backend.php
index 3ec7c5f262..8985ed0412 100644
--- a/libs/Zend/Cache/Backend.php
+++ b/libs/Zend/Cache/Backend.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: Backend.php 23775 2011-03-01 17:25:24Z ralph $
+ * @version $Id: Backend.php 23800 2011-03-10 20:52:08Z mabe $
*/
@@ -237,7 +237,9 @@ class Zend_Cache_Backend
// Create a default logger to the standard output stream
// require_once 'Zend/Log.php';
// require_once 'Zend/Log/Writer/Stream.php';
+ // require_once 'Zend/Log/Filter/Priority.php';
$logger = new Zend_Log(new Zend_Log_Writer_Stream('php://output'));
+ $logger->addFilter(new Zend_Log_Filter_Priority(Zend_Log::WARN, '<='));
$this->_directives['logger'] = $logger;
}
diff --git a/libs/Zend/Cache/Core.php b/libs/Zend/Cache/Core.php
index 2fa686806c..cc1fd8f423 100644
--- a/libs/Zend/Cache/Core.php
+++ b/libs/Zend/Cache/Core.php
@@ -16,7 +16,7 @@
* @package Zend_Cache
* @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: Core.php 23775 2011-03-01 17:25:24Z ralph $
+ * @version $Id: Core.php 23800 2011-03-10 20:52:08Z mabe $
*/
@@ -300,6 +300,8 @@ class Zend_Cache_Core
$id = $this->_id($id); // cache id may need prefix
$this->_lastId = $id;
self::_validateIdOrTag($id);
+
+ $this->_log("Zend_Cache_Core: load item '{$id}'", 7);
$data = $this->_backend->load($id, $doNotTestCacheValidity);
if ($data===false) {
// no cache available
@@ -326,6 +328,8 @@ class Zend_Cache_Core
$id = $this->_id($id); // cache id may need prefix
self::_validateIdOrTag($id);
$this->_lastId = $id;
+
+ $this->_log("Zend_Cache_Core: test item '{$id}'", 7);
return $this->_backend->test($id);
}
@@ -360,27 +364,22 @@ class Zend_Cache_Core
Zend_Cache::throwException("Datas must be string or set automatic_serialization = true");
}
}
+
// automatic cleaning
if ($this->_options['automatic_cleaning_factor'] > 0) {
$rand = rand(1, $this->_options['automatic_cleaning_factor']);
if ($rand==1) {
- if ($this->_extendedBackend) {
- // New way
- if ($this->_backendCapabilities['automatic_cleaning']) {
- $this->clean(Zend_Cache::CLEANING_MODE_OLD);
- } else {
- $this->_log('Zend_Cache_Core::save() / automatic cleaning is not available/necessary with this backend');
- }
+ // new way || deprecated way
+ if ($this->_extendedBackend || method_exists($this->_backend, 'isAutomaticCleaningAvailable')) {
+ $this->_log("Zend_Cache_Core::save(): automatic cleaning running", 7);
+ $this->clean(Zend_Cache::CLEANING_MODE_OLD);
} else {
- // Deprecated way (will be removed in next major version)
- if (method_exists($this->_backend, 'isAutomaticCleaningAvailable') && ($this->_backend->isAutomaticCleaningAvailable())) {
- $this->clean(Zend_Cache::CLEANING_MODE_OLD);
- } else {
- $this->_log('Zend_Cache_Core::save() / automatic cleaning is not available/necessary with this backend');
- }
+ $this->_log("Zend_Cache_Core::save(): automatic cleaning is not available/necessary with current backend", 4);
}
}
}
+
+ $this->_log("Zend_Cache_Core: save item '{$id}'", 7);
if ($this->_options['ignore_user_abort']) {
$abort = ignore_user_abort(true);
}
@@ -392,22 +391,23 @@ class Zend_Cache_Core
if ($this->_options['ignore_user_abort']) {
ignore_user_abort($abort);
}
+
if (!$result) {
// maybe the cache is corrupted, so we remove it !
- if ($this->_options['logging']) {
- $this->_log("Zend_Cache_Core::save() : impossible to save cache (id=$id)");
- }
+ $this->_log("Zend_Cache_Core::save(): failed to save item '{$id}' -> removing it", 4);
$this->_backend->remove($id);
return false;
}
+
if ($this->_options['write_control']) {
$data2 = $this->_backend->load($id, true);
if ($data!=$data2) {
- $this->_log('Zend_Cache_Core::save() / write_control : written and read data do not match');
+ $this->_log("Zend_Cache_Core::save(): write control of item '{$id}' failed -> removing it", 4);
$this->_backend->remove($id);
return false;
}
}
+
return true;
}
@@ -424,6 +424,8 @@ class Zend_Cache_Core
}
$id = $this->_id($id); // cache id may need prefix
self::_validateIdOrTag($id);
+
+ $this->_log("Zend_Cache_Core: remove item '{$id}'", 7);
return $this->_backend->remove($id);
}
@@ -458,6 +460,7 @@ class Zend_Cache_Core
Zend_Cache::throwException('Invalid cleaning mode');
}
self::_validateTagsArray($tags);
+
return $this->_backend->clean($mode, $tags);
}
@@ -649,6 +652,8 @@ class Zend_Cache_Core
Zend_Cache::throwException(self::BACKEND_NOT_IMPLEMENTS_EXTENDED_IF);
}
$id = $this->_id($id); // cache id may need prefix
+
+ $this->_log("Zend_Cache_Core: touch item '{$id}'", 7);
return $this->_backend->touch($id, $extraLifetime);
}
@@ -713,9 +718,11 @@ class Zend_Cache_Core
}
// Create a default logger to the standard output stream
- // require_once 'Zend/Log/Writer/Stream.php';
// require_once 'Zend/Log.php';
+ // require_once 'Zend/Log/Writer/Stream.php';
+ // require_once 'Zend/Log/Filter/Priority.php';
$logger = new Zend_Log(new Zend_Log_Writer_Stream('php://output'));
+ $logger->addFilter(new Zend_Log_Filter_Priority(Zend_Log::WARN, '<='));
$this->_options['logger'] = $logger;
}
diff --git a/libs/Zend/Cache/Frontend/File.php b/libs/Zend/Cache/Frontend/File.php
index e3d170bdd3..fe55dc7383 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 23775 2011-03-01 17:25:24Z ralph $
+ * @version $Id: File.php 23793 2011-03-02 22:31:05Z mabe $
*/
@@ -110,7 +110,11 @@ class Zend_Cache_Frontend_File extends Zend_Cache_Core
clearstatcache();
$i = 0;
foreach ($masterFiles as $masterFile) {
- $mtime = @filemtime($masterFile);
+ if (file_exists($masterFile)) {
+ $mtime = filemtime($masterFile);
+ } else {
+ $mtime = false;
+ }
if (!$this->_specificOptions['ignore_missing_master_files'] && !$mtime) {
Zend_Cache::throwException('Unable to read master_file : ' . $masterFile);
diff --git a/libs/Zend/Config/Yaml.php b/libs/Zend/Config/Yaml.php
index 0cc48a1f46..440465b436 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 23775 2011-03-01 17:25:24Z ralph $
+ * @version $Id: Yaml.php 23808 2011-03-16 21:26:56Z matthew $
*/
/**
@@ -284,7 +284,7 @@ class Zend_Config_Yaml extends Zend_Config
$config = array();
$inIndent = false;
while (list($n, $line) = each($lines)) {
- $lineno = $n+1;
+ $lineno = $n + 1;
if (strlen($line) == 0) {
continue;
}
@@ -313,7 +313,7 @@ class Zend_Config_Yaml extends Zend_Config
if (preg_match("/(\w+):\s*(.*)/", $line, $m)) {
// key: value
- if ($m[2]) {
+ if (strlen($m[2])) {
// simple key: value
$value = $m[2];
// Check for booleans and constants
diff --git a/libs/Zend/Version.php b/libs/Zend/Version.php
index c09bdb22cf..5e815224ee 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 23780 2011-03-01 21:23:36Z matthew $
+ * @version $Id: Version.php 23849 2011-04-06 15:23:21Z matthew $
*/
/**
@@ -32,7 +32,7 @@ final class Zend_Version
/**
* Zend Framework version identification - see compareVersion()
*/
- const VERSION = '1.11.4';
+ const VERSION = '1.11.5';
/**
* The latest stable version Zend Framework available