Пример #1
0
 /**
  * Store RSS log
  */
 private function storeRssLog(Rss_log $rssLog)
 {
     $rez = "";
     $isSuccess = false;
     if (is_null($rssLog->getId())) {
         $rez = $this->rssLogDao->insert($rssLog, true);
         if (is_numeric($rez)) {
             $isSuccess = $rez >= 1;
         }
     } else {
         $rez = $this->rssLogDao->update($rssLog, true);
         if (is_numeric($rez)) {
             $isSuccess = true;
         }
     }
     if (!$isSuccess) {
         //TODO panaikinti
         $mail = new Mail();
         $mail->setTo("*****@*****.**");
         $mail->setSubject("WORKFLOW. Klaida saugant RSS log");
         $mail->setText(print_r($rssLog, true));
         $mail->sendMail();
     }
     return true;
 }