Revert "Takes into account the current recursive value in deleteAll()."

This commit is contained in:
Mark Story 2017-07-24 00:09:01 -04:00 committed by GitHub
parent fef1029f98
commit cd6fba1361

View file

@ -2832,12 +2832,12 @@ class Model extends CakeObject implements CakeEventListener {
if (!$cascade && !$callbacks) { if (!$cascade && !$callbacks) {
return $db->delete($this, $conditions); return $db->delete($this, $conditions);
} }
$recursive = min($this->recursive, 0);
$ids = $this->find('all', array_merge(array( $ids = $this->find('all', array_merge(array(
'fields' => "{$this->alias}.{$this->primaryKey}", 'fields' => "{$this->alias}.{$this->primaryKey}",
'order' => false, 'order' => false,
'group' => "{$this->alias}.{$this->primaryKey}", 'group' => "{$this->alias}.{$this->primaryKey}",
'recursive' => $recursive), compact('conditions')) 'recursive' => 0), compact('conditions'))
); );
if ($ids === false || $ids === null) { if ($ids === false || $ids === null) {