Fix realtime search engine indexation

This commit is contained in:
Romain Neutron
2013-09-17 16:01:26 +02:00
parent 537c41fc09
commit 8dfe16c2bd
2 changed files with 11 additions and 5 deletions

View File

@@ -1165,11 +1165,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
*/
public function reindex()
{
$connbas = connection::getPDOConnection($this->app, $this->get_sbas_id());
$sql = 'UPDATE record SET status=(status & ~7 | 4)
WHERE record_id= :record_id';
$stmt = $connbas->prepare($sql);
$stmt->execute(array(':record_id' => $this->record_id));
$this->app['phraseanet.SE']->updateRecord($this);
$this->delete_data_from_cache(self::CACHE_STATUS);
return $this;