Removing unused $db in Model::_deleteLinks. Fixes #6384

This commit is contained in:
mark_story 2009-08-30 20:09:07 -04:00
parent 8be5de947b
commit 3cdf89dc18

View file

@ -1789,8 +1789,6 @@ class Model extends Overloadable {
* @access protected * @access protected
*/ */
function _deleteLinks($id) { function _deleteLinks($id) {
$db =& ConnectionManager::getDataSource($this->useDbConfig);
foreach ($this->hasAndBelongsToMany as $assoc => $data) { foreach ($this->hasAndBelongsToMany as $assoc => $data) {
$records = $this->{$data['with']}->find('all', array( $records = $this->{$data['with']}->find('all', array(
'conditions' => array_merge(array($this->{$data['with']}->escapeField($data['foreignKey']) => $id)), 'conditions' => array_merge(array($this->{$data['with']}->escapeField($data['foreignKey']) => $id)),