diff --git a/lib/Cake/Cache/Engine/ApcEngine.php b/lib/Cake/Cache/Engine/ApcEngine.php index 3c67ba945..8d0a8f1b1 100644 --- a/lib/Cake/Cache/Engine/ApcEngine.php +++ b/lib/Cake/Cache/Engine/ApcEngine.php @@ -49,7 +49,11 @@ class ApcEngine extends CacheEngine { * @return boolean True if the data was successfully cached, false on failure */ public function write($key, $value, $duration) { - $expires = time() + $duration; + if ($duration == 0) { + $expires = 0; + } else { + $expires = time() + $duration; + } apc_store($key.'_expires', $expires, $duration); return apc_store($key, $value, $duration); } @@ -63,7 +67,7 @@ class ApcEngine extends CacheEngine { public function read($key) { $time = time(); $cachetime = intval(apc_fetch($key.'_expires')); - if ($cachetime < $time || ($time + $this->settings['duration']) < $cachetime) { + if ($cachetime !== 0 && ($cachetime < $time || ($time + $this->settings['duration']) < $cachetime)) { return false; } return apc_fetch($key); diff --git a/lib/Cake/Console/Templates/default/views/home.ctp b/lib/Cake/Console/Templates/default/views/home.ctp index 663b8d583..490c2392c 100644 --- a/lib/Cake/Console/Templates/default/views/home.ctp +++ b/lib/Cake/Console/Templates/default/views/home.ctp @@ -1,4 +1,8 @@ +

For updates and important announcements, visit http://cakefest.org

+\n"; $output = "

Sweet, \"" . Inflector::humanize($app) . "\" got Baked by CakePHP!

\n"; $output .=" 'Apc', 'duration' => 0, 'prefix' => 'cake_')); + Cache::write('zero', 'Should save', 'apc'); + sleep(1); + + $result = Cache::read('zero', 'apc'); + $this->assertEqual('Should save', $result); + } + /** * testExpiry method * diff --git a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php index 93361d5bf..a2c6e2f98 100644 --- a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php +++ b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php @@ -206,7 +206,7 @@ class CakeFixtureManager { */ public function unload(CakeTestCase $test) { $fixtures = !empty($test->fixtures) ? $test->fixtures : array(); - foreach ($fixtures as $f) { + foreach (array_reverse($fixtures) as $f) { if (isset($this->_loaded[$f])) { $fixture = $this->_loaded[$f]; if (!empty($fixture->created)) { diff --git a/lib/Cake/TestSuite/templates/menu.php b/lib/Cake/TestSuite/templates/menu.php index 2c039fe01..a960b87aa 100644 --- a/lib/Cake/TestSuite/templates/menu.php +++ b/lib/Cake/TestSuite/templates/menu.php @@ -40,6 +40,7 @@ if (!empty($plugins)): +
  • Core diff --git a/lib/Cake/Utility/Folder.php b/lib/Cake/Utility/Folder.php index 1bc724dab..718bfb351 100644 --- a/lib/Cake/Utility/Folder.php +++ b/lib/Cake/Utility/Folder.php @@ -568,7 +568,7 @@ class Folder { * * - `to` The directory to copy to. * - `from` The directory to copy from, this will cause a cd() to occur, changing the results of pwd(). - * - `chmod` The mode to copy the files/directories with. + * - `mode` The mode to copy the files/directories with. * - `skip` Files/directories to skip. * * @param mixed $options Either an array of options (see above) or a string of the destination directory. diff --git a/lib/Cake/Utility/Sanitize.php b/lib/Cake/Utility/Sanitize.php index 6c70ce4ed..b0cebca03 100644 --- a/lib/Cake/Utility/Sanitize.php +++ b/lib/Cake/Utility/Sanitize.php @@ -232,7 +232,7 @@ class Sanitize { return $data; } else { if ($options['odd_spaces']) { - $data = str_replace(chr(0xCA), '', str_replace(' ', ' ', $data)); + $data = str_replace(chr(0xCA), '', $data); } if ($options['encode']) { $data = Sanitize::html($data, array('remove' => $options['remove_html'])); @@ -243,7 +243,6 @@ class Sanitize { if ($options['carriage']) { $data = str_replace("\r", "", $data); } - if ($options['unicode']) { $data = preg_replace("/&#([0-9]+);/s", "&#\\1;", $data); } diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 6c5c52024..088f51591 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -459,7 +459,8 @@ class FormHelper extends AppHelper { if ($model !== false) { $this->setEntity($model, true); } - return $this->Html->useTag('form', $action, $htmlAttributes) . $append; + $attributes = sprintf('action="%s" ', $action) . $this->_parseAttributes($htmlAttributes, null, ''); + return $this->Html->useTag('form', $action, $attributes) . $append; } /** diff --git a/lib/Cake/View/Pages/home.ctp b/lib/Cake/View/Pages/home.ctp index 3b961f984..ec5b66bee 100644 --- a/lib/Cake/View/Pages/home.ctp +++ b/lib/Cake/View/Pages/home.ctp @@ -20,6 +20,9 @@ if (Configure::read('debug') == 0): endif; App::uses('Debugger', 'Utility'); ?> +