From 54df7c300f66db5aa51b5122a32805b22f47a49f Mon Sep 17 00:00:00 2001 From: phpnut Date: Sun, 12 Mar 2006 08:56:11 +0000 Subject: [PATCH] Merging fixes and enhancements into trunk. Revision: [2267] Removed the 50 record limit on the Model::findAll(). Added _ between file and timestamp Fixed error thrown when variable was not an array git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2268 3807eeeb-6ff5-0310-8944-8be069107fe0 --- VERSION.txt | 2 +- cake/basics.php | 8 ++++++-- cake/libs/model/model_php4.php | 2 +- cake/libs/model/model_php5.php | 7 +++++-- cake/libs/view/view.php | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 8f69b34a9..a4e357362 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -6,4 +6,4 @@ // +---------------------------------------------------------------------------------------------------+ // /////////////////////////////////////////////////////////////////////////////////////////////////////////// -1.0.0.2266 \ No newline at end of file +1.0.0.2268 \ No newline at end of file diff --git a/cake/basics.php b/cake/basics.php index c9f217c00..e53305d05 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -28,6 +28,7 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ + /** * Basic defines for timing functions. */ @@ -950,7 +951,10 @@ function clearCache($params = null, $type = 'views', $ext = '.php') { foreach ($files as $key => $delete) { - array_map('unlink', $delete); + if(is_array($delete)) + { + array_map('unlink', $delete); + } } return true; } @@ -965,7 +969,6 @@ function clearCache($params = null, $type = 'views', $ext = '.php') } } - /** * Enter description here... * @@ -979,6 +982,7 @@ function stripslashes_deep($value) stripslashes($value); return $value; } + /** * Returns a translated string if one is found, * or the submitted message if not found. diff --git a/cake/libs/model/model_php4.php b/cake/libs/model/model_php4.php index cb2333733..1cfa7dddd 100644 --- a/cake/libs/model/model_php4.php +++ b/cake/libs/model/model_php4.php @@ -1187,7 +1187,7 @@ class Model extends Object * @param int $recursive The number of levels deep to fetch associated records * @return array Array of records */ - function findAll ($conditions = null, $fields = null, $order = null, $limit = 50, $page = 1, $recursive = null) + function findAll ($conditions = null, $fields = null, $order = null, $limit = null, $page = 1, $recursive = null) { $this->id = $this->getID(); $offset = 0; diff --git a/cake/libs/model/model_php5.php b/cake/libs/model/model_php5.php index 5c169a94e..f8ceac69c 100644 --- a/cake/libs/model/model_php5.php +++ b/cake/libs/model/model_php5.php @@ -1183,7 +1183,7 @@ class Model extends Object * @param int $recursive The number of levels deep to fetch associated records * @return array Array of records */ - function findAll ($conditions = null, $fields = null, $order = null, $limit = 50, $page = 1, $recursive = null) + function findAll ($conditions = null, $fields = null, $order = null, $limit = null, $page = 1, $recursive = null) { $this->id = $this->getID(); $offset = 0; @@ -1700,7 +1700,10 @@ class Model extends Object } } } - + echo "
";
+                print_r($assoc);
+                echo "
"; + die(); clearCache($assoc); return true; } diff --git a/cake/libs/view/view.php b/cake/libs/view/view.php index 8e5709619..83a74080f 100644 --- a/cake/libs/view/view.php +++ b/cake/libs/view/view.php @@ -809,7 +809,7 @@ class View extends Object $cacheTime = $now + strtotime($timestamp); } $result = preg_replace('/\/\//', '/', $this->here); - $cache = str_replace('/', '_', $result.$cacheTime.'.php'); + $cache = str_replace('/', '_', $result.'_'.$cacheTime.'.php'); $cache = str_replace('favicon.ico', '', $cache); return cache('views'.DS.$cache, $view, $timestamp); }