mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
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
This commit is contained in:
parent
61730a94c5
commit
54df7c300f
5 changed files with 14 additions and 7 deletions
|
@ -6,4 +6,4 @@
|
|||
// +---------------------------------------------------------------------------------------------------+ //
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
1.0.0.2266
|
||||
1.0.0.2268
|
|
@ -28,6 +28,7 @@
|
|||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Basic defines for timing functions.
|
||||
*/
|
||||
|
@ -949,9 +950,12 @@ function clearCache($params = null, $type = 'views', $ext = '.php')
|
|||
if(!empty($files))
|
||||
{
|
||||
foreach ($files as $key => $delete)
|
||||
{
|
||||
if(is_array($delete))
|
||||
{
|
||||
array_map('unlink', $delete);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 "<pre>";
|
||||
print_r($assoc);
|
||||
echo "</pre>";
|
||||
die();
|
||||
clearCache($assoc);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue