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);
 
   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)
 
   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)
 
  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"]);
 
  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;
 
  193                    return "il__git_" . $id;
 
  202                    return "il__wpage_" . $id;
 
  209                    return "il__mob_" . $id;
 
  213            case "RepositoryItem":
 
  215                $tarr = explode(
"_", $a_target);
 
  216                $import_id = $a_target;
 
  221                if ($tarr[4] != 
"") {
 
  222                    $import_id = $tarr[0] . 
"_" . $tarr[1] . 
"_" . $tarr[2] . 
"_" . $tarr[3];
 
  231                    foreach ($refs as $ref) {
 
  232                        return "il__obj_" . $ref;
 
  242                    if ($tarr[4] != 
"") {
 
  243                        return "il__obj_" . $tarr[4];
 
  266        $tree = 
$DIC->repositoryTree();
 
  270            case "StructureObject":
 
  271                include_once(
"./Modules/LearningModule/classes/class.ilLMObject.php");
 
  280                include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
  285                include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
 
  289            case "RepositoryItem":
 
  290                if (is_int(strpos($a_target, 
"_"))) {
 
  292                    return $tree->isInTree($ref_id);
 
  307        if (!is_int(strpos($a_target, 
"__"))) {
 
  308            $target = explode(
"_", $a_target);
 
  309            if ($target[1] > 0) {
 
  323        if (!is_int(strpos($a_target, 
"__"))) {
 
  324            $target = explode(
"_", $a_target);
 
  325            if ($target[1] > 0) {
 
  326                return "il__" . $target[2] . 
"_" . $target[3];
 
  339        $target = explode(
"_", $a_target);
 
  340        return $target[count($target) - 1];
 
  350        $target = explode(
"_", $a_target);
 
  351        return $target[count($target) - 2];
 
  366        $query_parser->setMinWordLength(3);
 
  367        $query_parser->parse();
 
  370        $user_search->enableActiveCheck(
true);
 
  371        $user_search->setFields(array(
'login'));
 
  372        $result_obj = $user_search->performSearch();
 
  373        $result->mergeEntries($result_obj);
 
  375        $user_search->setFields(array(
'firstname'));
 
  376        $result_obj = $user_search->performSearch();
 
  377        $result->mergeEntries($result_obj);
 
  379        $user_search->setFields(array(
'lastname'));
 
  380        $result_obj = $user_search->performSearch();
 
  381        $result->mergeEntries($result_obj);
 
  384        $result->preventOverwritingMaxhits(
true);
 
  385        $result->filter(ROOT_FOLDER_ID, 
true);
 
  388        include_once 
'Services/User/classes/class.ilUserFilter.php';
 
  391        include_once(
"./Services/User/classes/class.ilObjUser.php");
 
  394        $users = array_intersect($users, $p[
"public"]);
 
An exception for terminatinating execution or to throw for unit testing.
static _exists($a_id)
checks wether a glossary term with specified id exists or not
static _getIdForImportId($a_import_id)
get current term id for import id (static)
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 _deleteAllLinksOfSource($a_source_type, $a_source_id, $a_lang="-")
Delete all links of a given source.
static searchUsers($a_search_str)
Search users.
static _extractObjIdOfTarget($a_target)
Extract object id out of target.
static _deleteAllLinksToTarget($a_target_type, $a_target_id, $a_target_inst=0)
Delete all links to a given target.
static _removeInstFromTarget($a_target)
Removes installation id from target string.
static _exists($a_type, $a_target)
Check if internal link refers to a valid target.
static _extractTypeOfTarget($a_target)
Extract type out of target.
static _getSourcesOfTarget($a_target_type, $a_target_id, $a_target_inst)
get all sources of a link target
static _getIdForImportId($a_type, $a_target)
Get current id for an import id.
static _getTargetsOfSource($a_source_type, $a_source_id, $a_source_lang="-")
Get all targets of a source object (e.g., a page)
static _extractInstOfTarget($a_target)
Extract installation id out of target.
static _getIdForImportId($a_import_id)
get current object id for import id (static)
static _exists($a_id)
checks wether a lm content object with specified id exists or not
static getProfileStatusOfUsers($a_user_ids)
Get profile status.
static _getUserSearchInstance($query_parser)
get reference of ilLikeUserSearch
static _getAllReferences($a_id)
get all reference ids of object
static _getIdForImportId($a_import_id)
get current object id for import id (static)
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static getInstance()
Singelton get instance.