53 $a_tree_id =
$GLOBALS[
'DIC'][
'ilUser']->getId();
56 $this->tree =
new ilTree($a_tree_id);
57 $this->tree->setTableNames(
'bookmark_tree',
'bookmark_data');
76 $q =
"SELECT * FROM bookmark_data WHERE obj_id = ".
77 $ilDB->quote($this->
getId(),
"integer");
78 $bm_set = $ilDB->query($q);
79 if ($ilDB->numRows($bm_set) == 0)
81 $message =
"ilBookmark::read(): Bookmark with id ".$this->id.
" not found!";
82 $ilias->raiseError($message,$ilias->error_obj->WARNING);
86 $bm = $ilDB->fetchAssoc($bm_set);
90 $this->
setParent($this->tree->getParentId($this->id));
101 if ($this->
getId() != 1)
103 $q =
"DELETE FROM bookmark_data WHERE obj_id = ".
104 $ilDB->quote($this->
getId(),
"integer");
105 $ilDB->manipulate($q);
117 $this->
setId($ilDB->nextId(
"bookmark_data"));
119 "INSERT INTO bookmark_data (obj_id, user_id, title,description, target, type) ".
120 "VALUES (%s,%s,%s,%s,%s,%s)",
121 $ilDB->quote($this->getId(),
"integer"),
122 $ilDB->quote(
$GLOBALS[
'DIC'][
'ilUser']->getId(),
"integer"),
123 $ilDB->quote($this->getTitle(),
"text"),
124 $ilDB->quote($this->getDescription(),
"text"),
125 $ilDB->quote($this->getTarget(),
"text"),
126 $ilDB->quote(
'bm',
"text")
129 $ilDB->manipulate($q);
141 "UPDATE bookmark_data SET title=%s,description=%s,target=%s ".
143 $ilDB->quote($this->getTitle(),
"text"),
144 $ilDB->quote($this->getDescription(),
"text"),
145 $ilDB->quote($this->getTarget(),
"text"),
146 $ilDB->quote($this->getId(),
"integer")
148 $ilDB->manipulate($q);
174 $this->title = $a_str;
188 $this->description = $a_str;
203 $this->target = $a_target;
214 $this->
parent = $a_parent_id;
230 $q =
"SELECT * FROM bookmark_data WHERE obj_id = ".
231 $ilDB->quote($a_id,
"integer");
232 $bm_set = $ilDB->query($q);
233 if ($ilDB->numRows($bm_set) == 0)
239 $bm = $ilDB->fetchAssoc($bm_set);
Class Bookmarks Bookmark management.
setTarget($a_target)
set target public
read()
read bookmark folder data from db
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setTitle($a_str)
set title public
update()
Update bookmark item.
create()
Create new bookmark item.
redirection script todo: (a better solution should control the processing via a xml file) ...
static _getTypeOfId($a_id)
get type of a given id
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setDescription($a_str)
set description public
__construct($a_bm_id=0, $a_tree_id=0)
Constructor public.