Ejemplo n.º 1
0
 public function save(Doctrine_Connection $conn = null)
 {
     $conn = $conn ? $conn : $this->getTable()->getConnection();
     $conn->beginTransaction();
     try {
         $ret = parent::save($conn);
         LuceneEngine::updateLuceneIndexFor($this);
         $conn->commit();
         return $ret;
     } catch (Exception $e) {
         $conn->rollBack();
         throw $e;
     }
 }
Ejemplo n.º 2
0
 public function save(Doctrine_Connection $conn = null)
 {
     $conn = $conn ? $conn : $this->getTable()->getConnection();
     $conn->beginTransaction();
     try {
         $ret = parent::save($conn);
         if (!$this->location_id && !$this->profit_id && !$this->fish_event_id || $this->location_id && $this->getLocation()->location_scope_id == 5 || $this->profit_id && $this->getProfit()->getLocation()->location_scope_id == 5 || $this->fish_event_id && $this->getFishEvent()->getLocation()->location_scope_id == 5) {
             LuceneEngine::updateLuceneIndexFor($this);
         }
         $conn->commit();
         return $ret;
     } catch (Exception $e) {
         $conn->rollBack();
         throw $e;
     }
 }
Ejemplo n.º 3
0
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
 public function executeAddbot(sfWebRequest $request)
 {
     $bn = BotNet::create();
     $lcoations = Doctrine_Query::create()->from('Location')->execute();
     foreach ($lcoations as $loc) {
         LuceneEngine::updateLuceneIndexFor($loc);
     }
 }