Пример #1
0
 /**
  * Store changes to this offering
  *
  * @param   boolean  $check  Perform data validation check?
  * @return  boolean  False if error, True on success
  */
 public function store($check = true)
 {
     if (!$this->get('anonymous')) {
         $this->set('anonymous', 0);
     }
     $this->set('about', \Hubzero\Utility\Sanitize::clean($this->get('about')));
     if (!parent::store($check)) {
         return false;
     }
     return true;
 }
Пример #2
0
 /**
  * Store changes to this offering
  *
  * @param   boolean  $check  Perform data validation check?
  * @return  boolean  False if error, True on success
  */
 public function store($check = true)
 {
     if (!$this->get('anonymous')) {
         $this->set('anonymous', 0);
     }
     $string = str_replace(array('&', '<', '>'), array('&', '<', '>'), $this->get('about'));
     $this->set('about', \Hubzero\Utility\Sanitize::clean($string));
     if (!parent::store($check)) {
         return false;
     }
     return true;
 }
Пример #3
0
 /**
  * Delete an entry and its associated content
  *
  * @return  boolean  True on success, false if not
  */
 public function delete()
 {
     // Can't delete what doesn't exist
     if (!$this->exists()) {
         return true;
     }
     // Remove comments
     foreach ($this->replies() as $reply) {
         if (!$reply->delete()) {
             $this->setError($reply->getError());
             return false;
         }
     }
     return parent::delete();
 }