function create($a_use_provided_creation_date = false) { global $ilDB; $cd = $a_use_provided_creation_date ? $this->getCreationDate() : ilUtil::now(); $this->id = $ilDB->nextId("note"); /*$q = "INSERT INTO note (id, rep_obj_id, obj_id, obj_type, type,". "author, note_text, subject, label, creation_date) VALUES (". $ilDB->quote($this->id, "integer").",". $ilDB->quote((int) $this->rep_obj_id, "integer").",". $ilDB->quote((int) $this->obj_id, "integer").",". $ilDB->quote((string) $this->obj_type, "text").",". $ilDB->quote((int) $this->type, "integer").",". $ilDB->quote((int) $this->author, "integer").",". $ilDB->quote((string) $this->text, "clob").",". $ilDB->quote((string) $this->subject, "text").",". $ilDB->quote((int) $this->label, "integer").",". $ilDB->now().")"; $ilDB->manipulate($q);*/ $ilDB->insert("note", array("id" => array("integer", $this->id), "rep_obj_id" => array("integer", (int) $this->rep_obj_id), "obj_id" => array("integer", (int) $this->obj_id), "obj_type" => array("text", (string) $this->obj_type), "type" => array("integer", (int) $this->type), "author" => array("integer", (int) $this->author), "note_text" => array("clob", (string) $this->text), "subject" => array("text", (string) $this->subject), "label" => array("integer", (int) $this->label), "creation_date" => array("timestamp", $cd), "no_repository" => array("integer", $this->no_repository))); $this->creation_date = ilNote::_lookupCreationDate($this->getId()); }