72 $this->tree =
new ilTree($a_tree_id);
73 $this->tree->setTableNames(
'bookmark_tree',
'bookmark_data');
92 $q =
"SELECT * FROM bookmark_data WHERE obj_id = ".$this->ilias->db->quote($this->
getId());
93 $bm_set = $this->ilias->db->query($q);
94 if ($bm_set->numRows() == 0)
96 $message =
"ilBookmark::read(): Bookmark with id ".$this->id.
" not found!";
97 $ilias->raiseError($message,$ilias->error_obj->WARNING);
105 $this->
setParent($this->tree->getParentId($this->id));
114 $q =
"DELETE FROM bookmark_data WHERE obj_id = ".$this->ilias->db->quote($this->
getId());
115 $this->ilias->db->query($q);
122 "INSERT INTO bookmark_data (user_id, title,description, target, type) ".
123 "VALUES (%s,%s,%s,%s,%s)",
124 $this->ilias->db->quote(
$_SESSION[
"AccountId"]),
125 $this->ilias->db->quote($this->
getTitle()),
127 $this->ilias->db->quote($this->
getTarget()),
128 $this->ilias->db->quote(
'bm')
131 $this->ilias->db->query($q);
132 $this->
setId($this->ilias->db->getLastInsertId());
139 "UPDATE bookmark_data SET title=%s,description=%s,target=%s ".
141 $this->ilias->db->quote($this->getTitle()),
142 $this->ilias->db->quote($this->getDescription()),
143 $this->ilias->db->quote($this->getTarget()),
144 $this->ilias->db->quote($this->getId())
146 $this->ilias->db->query($q);
172 $this->title = $a_str;
186 $this->description = $a_str;
201 $this->target = $a_target;
212 $this->parent = $a_parent_id;