From f54dd266df7dad549e22d4c85c363b04b10c9621 Mon Sep 17 00:00:00 2001 From: Qiang Xue <qiang.xue@gmail.com> Date: Sun, 23 Mar 2014 16:48:50 -0400 Subject: [PATCH] reverted incorrect renaming. --- framework/caching/FileCache.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/framework/caching/FileCache.php b/framework/caching/FileCache.php index eacf8c4..3870e80 100644 --- a/framework/caching/FileCache.php +++ b/framework/caching/FileCache.php @@ -225,10 +225,10 @@ class FileCache extends Cache * Recursively removing expired cache files under a directory. * This method is mainly used by [[gc()]]. * @param string $path the directory under which expired cache files are removed. - * @param boolean $durationdOnly whether to only remove expired cache files. If false, all files + * @param boolean $expiredOnly whether to only remove expired cache files. If false, all files * under `$path` will be removed. */ - protected function gcRecursive($path, $durationdOnly) + protected function gcRecursive($path, $expiredOnly) { if (($handle = opendir($path)) !== false) { while (($file = readdir($handle)) !== false) { @@ -237,11 +237,11 @@ class FileCache extends Cache } $fullPath = $path . DIRECTORY_SEPARATOR . $file; if (is_dir($fullPath)) { - $this->gcRecursive($fullPath, $durationdOnly); - if (!$durationdOnly) { + $this->gcRecursive($fullPath, $expiredOnly); + if (!$expiredOnly) { @rmdir($fullPath); } - } elseif (!$durationdOnly || $durationdOnly && @filemtime($fullPath) < time()) { + } elseif (!$expiredOnly || $expiredOnly && @filemtime($fullPath) < time()) { @unlink($fullPath); } } -- libgit2 0.27.1