Пример #1
0
 /**
  * Insert the link between $type and the Attachment
  * @return bool
  */
 function insert()
 {
     if (!is_numeric($this->linked->id)) {
         $this->setLinkedIdFromString($this->linked->id);
     }
     return parent::insert();
 }
Пример #2
0
 /**
  * Automatically adds the next revision id, the user who does the save and the current timestamp
  */
 function insert()
 {
     $this->revision_id = $this->_getNextRevision();
     $this->user = new User($this->db, $_SESSION['user_id']);
     $this->revision_datetime = date('Y-m-d H:i:s');
     parent::insert();
 }
Пример #3
0
 /**
  * (non-PHPdoc)
  * @see AbstractObject#insert($graceful)
  */
 function insert()
 {
     $this->created = date('Y-m-d H:i:s');
     $this->hash = $this->_uniqueHash();
     $this->user = $_SESSION['user_id'] > 0 ? new User($this->db, $_SESSION['user_id']) : null;
     $this->character = htmlentities($this->character);
     $this->action = htmlentities($this->action);
     return parent::insert();
 }
Пример #4
0
 /**
  * Inserts a new user
  * @return int $id
  */
 function insert()
 {
     $this->id = $this->_selectNewId();
     parent::insert();
     return $this->id;
 }