52 $this->tree =
new ilTree($a_tree_id);
53 $this->tree->setTableNames(
'bookmark_tree',
'bookmark_data');
72 $q =
"SELECT * FROM bookmark_data WHERE obj_id = ".
73 $ilDB->quote($this->
getId(),
"integer");
74 $bm_set = $ilDB->query(
$q);
75 if ($ilDB->numRows($bm_set) == 0)
77 $message =
"ilBookmark::read(): Bookmark with id ".$this->id.
" not found!";
78 $ilias->raiseError($message,$ilias->error_obj->WARNING);
82 $bm = $ilDB->fetchAssoc($bm_set);
86 $this->
setParent($this->tree->getParentId($this->id));
97 if ($this->
getId() != 1)
99 $q =
"DELETE FROM bookmark_data WHERE obj_id = ".
100 $ilDB->quote($this->
getId(),
"integer");
101 $ilDB->manipulate(
$q);
113 $this->
setId($ilDB->nextId(
"bookmark_data"));
115 "INSERT INTO bookmark_data (obj_id, user_id, title,description, target, type) ".
116 "VALUES (%s,%s,%s,%s,%s,%s)",
117 $ilDB->quote($this->getId(),
"integer"),
118 $ilDB->quote(
$_SESSION[
"AccountId"],
"integer"),
119 $ilDB->quote($this->
getTitle(),
"text"),
121 $ilDB->quote($this->
getTarget(),
"text"),
122 $ilDB->quote(
'bm',
"text")
125 $ilDB->manipulate($q);
137 "UPDATE bookmark_data SET title=%s,description=%s,target=%s ".
139 $ilDB->quote($this->getTitle(),
"text"),
140 $ilDB->quote($this->getDescription(),
"text"),
141 $ilDB->quote($this->getTarget(),
"text"),
142 $ilDB->quote($this->getId(),
"integer")
144 $ilDB->manipulate(
$q);
170 $this->title = $a_str;
184 $this->description = $a_str;
199 $this->target = $a_target;
210 $this->parent = $a_parent_id;
226 $q =
"SELECT * FROM bookmark_data WHERE obj_id = ".
227 $ilDB->quote($a_id,
"integer");
228 $bm_set = $ilDB->query(
$q);
229 if ($ilDB->numRows($bm_set) == 0)
235 $bm = $ilDB->fetchAssoc($bm_set);