fixed updateIndex()
This commit is contained in:
parent
6825767cba
commit
ee1cf1013a
@ -90,12 +90,17 @@ class Doctrine_Search extends Doctrine_Plugin
|
||||
$fields = $this->getOption('fields');
|
||||
$class = $this->getOption('className');
|
||||
$name = $this->getOption('resource')->getComponentName();
|
||||
$conn = $this->getOption('resource')->getConnection();
|
||||
$identifier = $this->_options['resource']->getIdentifier();
|
||||
|
||||
Doctrine_Query::create()->delete()
|
||||
->from($class)
|
||||
->where($identifier . ' = ?', array($data[$identifier]))
|
||||
->execute();;
|
||||
|
||||
if ($this->_options['batchUpdates'] === true) {
|
||||
|
||||
$conn = $this->getOption('resource')->getConnection();
|
||||
|
||||
$index = new $class();
|
||||
|
||||
foreach ((array) $this->_options['resource']->getIdentifier() as $id) {
|
||||
$index->$id = $data[$id];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user