/**
  * Change targest of repository links. Use full targets in "from" and "to"!!!
  *
  * @param	array	keys are the old targets, values are the new targets
  */
 static function _handleImportRepositoryLinks($a_rep_import_id, $a_rep_type, $a_rep_ref_id)
 {
     include_once "./Services/COPage/classes/class.ilInternalLink.php";
     //echo "-".$a_rep_import_id."-".$a_rep_ref_id."-";
     $sources = ilInternalLink::_getSourcesOfTarget("obj", ilInternalLink::_extractObjIdOfTarget($a_rep_import_id), ilInternalLink::_extractInstOfTarget($a_rep_import_id));
     //var_dump($sources);
     foreach ($sources as $source) {
         //echo "A";
         if ($source["type"] == "lm:pg") {
             //echo "B";
             $page_obj = new ilPageObject("lm", $source["id"], false);
             if (!$page_obj->page_not_found) {
                 //echo "C";
                 $page_obj->handleImportRepositoryLink($a_rep_import_id, $a_rep_type, $a_rep_ref_id);
             }
             $page_obj->update();
         }
     }
 }