public function save(Doctrine_Connection $conn = null) { $conn = $conn ? $conn : $this->getTable()->getConnection(); $conn->beginTransaction(); try { $ret = parent::save($conn); //only public locations if ($this->getLocationScopeId() == 5) { LuceneEngine::updateLuceneIndexFor($this); } $conn->commit(); return $ret; } catch (Exception $e) { $conn->rollBack(); throw $e; } }