mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Minor optimizations
Closes #5249 and #5282 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7664 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
c416b5d241
commit
370b20dce6
2 changed files with 2 additions and 3 deletions
|
@ -627,14 +627,13 @@ class Configure extends Object {
|
|||
trigger_error('Cache not configured properly. Please check Cache::config(); in APP/config/core.php', E_USER_WARNING);
|
||||
$cache = Cache::config('default', array('engine' => 'File'));
|
||||
}
|
||||
$path = $prefix = null;
|
||||
$path = $prefix = $duration = null;
|
||||
|
||||
if (!empty($cache['settings']['path'])) {
|
||||
$path = realpath($cache['settings']['path']);
|
||||
} else {
|
||||
$prefix = $cache['settings']['prefix'];
|
||||
}
|
||||
$duration = $cache['settings']['duration'];
|
||||
|
||||
if (Configure::read() >= 1) {
|
||||
$duration = '+10 seconds';
|
||||
|
|
|
@ -2133,7 +2133,7 @@ class Model extends Overloadable {
|
|||
if (!empty($this->id)) {
|
||||
$fields[$this->alias . '.' . $this->primaryKey . ' !='] = $this->id;
|
||||
}
|
||||
return ($this->find('count', array('conditions' => $fields)) == 0);
|
||||
return ($this->find('count', array('conditions' => $fields, 'recursive' => -1)) == 0);
|
||||
}
|
||||
/**
|
||||
* Returns a resultset for given SQL statement. Generic SQL queries should be made with this method.
|
||||
|
|
Loading…
Reference in a new issue