27 $ilDB = $DIC->database();
31 $lang_where =
" AND source_lang = " .
$ilDB->quote($a_lang,
"text");
34 $q =
"DELETE FROM int_link WHERE source_type = " .
35 $ilDB->quote($a_source_type,
"text") .
" AND source_id=" .
36 $ilDB->quote((
int) $a_source_id,
"integer") .
38 $ilDB->manipulate($q);
52 $ilDB = $DIC->database();
55 "DELETE FROM int_link WHERE target_type = %s " .
56 " AND target_id = %s AND target_inst = %s ",
57 array(
"text",
"integer",
"integer"),
58 array($a_target_type, (
int) $a_target_id, (
int) $a_target_inst)
81 $ilDB = $DIC->database();
86 "source_type" => array(
"text", $a_source_type),
87 "source_id" => array(
"integer", (
int) $a_source_id),
88 "source_lang" => array(
"text", $a_source_lang),
89 "target_type" => array(
"text", $a_target_type),
90 "target_id" => array(
"integer", (
int) $a_target_id),
91 "target_inst" => array(
"integer", (
int) $a_target_inst)
110 $ilDB = $DIC->database();
112 $q =
"SELECT * FROM int_link WHERE " .
113 "target_type = " .
$ilDB->quote($a_target_type,
"text") .
" AND " .
114 "target_id = " .
$ilDB->quote((
int) $a_target_id,
"integer") .
" AND " .
115 "target_inst = " .
$ilDB->quote((
int) $a_target_inst,
"integer");
116 $source_set =
$ilDB->query($q);
118 while ($source_rec =
$ilDB->fetchAssoc($source_set)) {
119 $sources[$source_rec[
"source_type"] .
":" . $source_rec[
"source_id"] .
":" . $source_rec[
"source_lang"]] =
120 array(
"type" => $source_rec[
"source_type"],
"id" => $source_rec[
"source_id"],
121 "lang" => $source_rec[
"source_lang"]);
139 $ilDB = $DIC->database();
142 if ($a_source_lang !=
"") {
143 $lang_where =
" AND source_lang = " .
$ilDB->quote($a_source_lang,
"text");
146 $q =
"SELECT * FROM int_link WHERE " .
147 "source_type = " .
$ilDB->quote($a_source_type,
"text") .
" AND " .
148 "source_id = " .
$ilDB->quote((
int) $a_source_id,
"integer") .
151 $target_set =
$ilDB->query($q);
153 while ($target_rec =
$ilDB->fetchAssoc($target_set)) {
154 $targets[$target_rec[
"target_type"] .
":" . $target_rec[
"target_id"] .
":" . $target_rec[
"target_inst"]] =
155 array(
"type" => $target_rec[
"target_type"],
"id" => $target_rec[
"target_id"],
156 "inst" => $target_rec[
"target_inst"]);
173 include_once(
"./Modules/LearningModule/classes/class.ilLMObject.php");
178 return "il__pg_" .
$id;
182 case "StructureObject":
185 return "il__st_" .
$id;
190 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
194 return "il__git_" .
$id;
203 return "il__wpage_" .
$id;
210 return "il__mob_" .
$id;
214 case "RepositoryItem":
216 $tarr = explode(
"_", $a_target);
217 $import_id = $a_target;
222 if ($tarr[4] !=
"") {
223 $import_id = $tarr[0] .
"_" . $tarr[1] .
"_" . $tarr[2] .
"_" . $tarr[3];
232 foreach ($refs as $ref) {
233 return "il__obj_" . $ref;
243 if ($tarr[4] !=
"") {
244 return "il__obj_" . $tarr[4];
267 $tree = $DIC->repositoryTree();
271 case "StructureObject":
272 include_once(
"./Modules/LearningModule/classes/class.ilLMObject.php");
277 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
282 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
287 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
291 case "RepositoryItem":
292 if (is_int(strpos($a_target,
"_"))) {
294 return $tree->isInTree($ref_id);
309 if (!is_int(strpos($a_target,
"__"))) {
310 $target = explode(
"_", $a_target);
325 if (!is_int(strpos($a_target,
"__"))) {
326 $target = explode(
"_", $a_target);
341 $target = explode(
"_", $a_target);
352 $target = explode(
"_", $a_target);
368 $query_parser->setMinWordLength(3);
369 $query_parser->parse();
372 $user_search->enableActiveCheck(
true);
373 $user_search->setFields(array(
'login'));
374 $result_obj = $user_search->performSearch();
375 $result->mergeEntries($result_obj);
377 $user_search->setFields(array(
'firstname'));
378 $result_obj = $user_search->performSearch();
379 $result->mergeEntries($result_obj);
381 $user_search->setFields(array(
'lastname'));
382 $result_obj = $user_search->performSearch();
383 $result->mergeEntries($result_obj);
386 $result->preventOverwritingMaxhits(
true);
387 $result->filter(ROOT_FOLDER_ID,
true);
390 include_once
'Services/User/classes/class.ilUserFilter.php';
393 include_once(
"./Services/User/classes/class.ilObjUser.php");
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static searchUsers($a_search_str)
Search users.
static _removeInstFromTarget($a_target)
Removes installation id from target string.
static getProfileStatusOfUsers($a_user_ids)
Get profile status.
static _exists($a_id)
checks wether a lm content object with specified id exists or not
static _extractInstOfTarget($a_target)
Extract installation id out of target.
static _getIdForImportId($a_import_id)
get current object id for import id (static)
static _extractTypeOfTarget($a_target)
Extract type out of target.
static _extractObjIdOfTarget($a_target)
Extract object id out of target.
if(!array_key_exists('StateId', $_REQUEST)) $id
static _getIdForImportId($a_type, $a_target)
Get current id for an import id.
static _getIdForImportId($a_import_id)
get current term id for import id (static)
static getInstance()
Singelton get instance.
static _getAllReferences($a_id)
get all reference ids of object
static _exists($a_id)
checks wether a glossary term with specified id exists or not
static _getUserSearchInstance($query_parser)
get reference of ilLikeUserSearch
static _exists($a_type, $a_target)
Check if internal link refers to a valid target.
static _getSourcesOfTarget($a_target_type, $a_target_id, $a_target_inst)
get all sources of a link target
static _getTargetsOfSource($a_source_type, $a_source_id, $a_source_lang="-")
Get all targets of a source object (e.g., a page)
static _deleteAllLinksOfSource($a_source_type, $a_source_id, $a_lang="-")
Delete all links of a given source.
static _saveLink( $a_source_type, $a_source_id, $a_target_type, $a_target_id, $a_target_inst=0, $a_source_lang="-")
save internal link information
static _deleteAllLinksToTarget($a_target_type, $a_target_id, $a_target_inst=0)
Delete all links to a given target.
static _getIdForImportId($a_import_id)
get current object id for import id (static)