Example #1
0
 /**
  * Persist news properties
  *
  * This function can be used to persist with the database
  * any changes made to the current news object.
  * <br/>Example:
  * <code>
  * $news -> news['title'] = 'new Title';              //Change the news title
  * $news -> persist();                                   //Make the change permanent
  * </code>
  *
  * @since 3.6.0
  * @access public
  */
 public function persist()
 {
     parent::persist();
     EfrontSearch::removeText('news', $this->news['id'], 'data');
     EfrontSearch::insertText($this->news['data'], $this->news['id'], "news", "data");
     EfrontSearch::removeText('news', $this->news['id'], 'title');
     EfrontSearch::insertText($this->news['title'], $this->news['id'], "news", "title");
 }
Example #2
0
 public function persist()
 {
     parent::persist();
     $sourceUnit = new EfrontUnit($this->comments['content_ID']);
     EfrontEvent::triggerEvent(array("type" => EfrontEvent::NEW_COMMENT_WRITING, "lessons_ID" => $sourceUnit['lessons_ID'], "entity_ID" => $this->comments['content_ID'], "entity_name" => $sourceUnit['name']));
 }
Example #3
0
 /**
  * Persist glossary properties
  *
  * This function can be used to persist with the database
  * any changes made to the current glossary object.
  * <br/>Example:
  * <code>
  * $glossary -> glossary['name'] = 'new Title';              //Change the name
  * $glossary -> persist();                                   //Make the change permanent
  * </code>
  *
  * @since 3.6.0
  * @access public
  */
 public function persist()
 {
     // added to fix http://forum.efrontlearning.net/viewtopic.php?f=5&t=2851&p=14715
     if (mb_substr($this->glossary['info'], 0, 3) == "<p>") {
         $this->glossary['info'] = mb_substr($this->glossary['info'], 3);
         if (mb_substr($this->glossary['info'], -4, 4) == "</p>") {
             $this->glossary['info'] = mb_substr($this->glossary['info'], 0, -4);
         }
     }
     parent::persist();
     EfrontSearch::removeText('glossary', $this->glossary['id'], 'data');
     EfrontSearch::insertText($this->glossary['info'], $this->glossary['id'], "glossary", "data");
     EfrontSearch::removeText('glossary', $this->glossary['id'], 'title');
     EfrontSearch::insertText($this->glossary['title'], $this->glossary['id'], "glossary", "title");
 }
 /**
  * (non-PHPdoc)
  * @see libraries/EfrontEntity#persist()
  */
 public function persist()
 {
     unset($this->layout['positions']['comment']);
     $this->{$this->entity}['options'] = serialize($this->options);
     $this->{$this->entity}['layout'] = serialize($this->layout);
     parent::persist();
     EfrontCache::getInstance()->deleteCache('themes');
 }
Example #5
0
 /**
  * (non-PHPdoc)
  * @see libraries/EfrontEntity#persist()
  */
 public function persist()
 {
     parent::persist();
     EfrontSearch::removeText('f_poll', $this->{$this->entity}['id'], 'title');
     EfrontSearch::insertText($fields['title'], $this->{$this->entity}['id'], "f_poll", "title");
 }