public function insert() { //create an ID for subscribing and unsubscribing $this->confirm_id = md5(uniqid()); //set the last sent to now $this->last_sent = mysql_date(time()); return parent::insert(); }
public function insert() { $this->url_id = $this->generate_url_id($this->name); $saved = parent::insert(); //if url_id ended up fase, then set it to the ID if ($this->url_id == false) { $this->url_id = $this->id; $this->update(); } return $saved; }
public function insert() { $return = false; $search = factory::create('search'); $result = $search->search("tag", array(array("tag", "=", $this->tag))); if (count($result) > 0) { $this->tag = $result[0]->tag; $this->tag_id = $result[0]->tag_id; $return = true; } else { $return = parent::insert(); } return $return; }