/**
  * get tabs
  * @access	public
  */
 function setTabs()
 {
     global $ilTabs, $lng, $ilHelp;
     $ilHelp->setScreenIdComponent("webr");
     if ($this->checkPermissionBool('read')) {
         $ilTabs->addTab("id_content", $lng->txt("content"), $this->ctrl->getLinkTarget($this, "view"));
     }
     if ($this->checkPermissionBool('visible')) {
         $ilTabs->addTab("id_info", $lng->txt("info_short"), $this->ctrl->getLinkTarget($this, "infoScreen"));
     }
     if ($this->checkPermissionBool('write') and !$this->getCreationMode()) {
         include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
         if (ilLinkResourceItems::lookupNumberOfLinks($this->object->getId()) > 1) {
             $ilTabs->addTab("id_settings", $lng->txt("settings"), $this->ctrl->getLinkTarget($this, "settings"));
         }
     }
     if ($this->checkPermissionBool('write')) {
         $ilTabs->addTab("id_history", $lng->txt("history"), $this->ctrl->getLinkTarget($this, "history"));
     }
     if ($this->checkPermissionBool('write')) {
         // Check if pear library is available
         if (@(include_once 'HTTP/Request.php')) {
             $ilTabs->addTab("id_link_check", $lng->txt("link_check"), $this->ctrl->getLinkTarget($this, "linkChecker"));
         }
     }
     if ($this->checkPermissionBool('write')) {
         $ilTabs->addTab("id_meta_data", $lng->txt("meta_data"), $this->ctrl->getLinkTargetByClass('ilmdeditorgui', 'listSection'));
     }
     if ($this->checkPermissionBool('write')) {
         $ilTabs->addTab('export', $this->lng->txt('export'), $this->ctrl->getLinkTargetByClass('ilexportgui', ''));
     }
     // will add permission tab if needed
     parent::setTabs();
 }
 /**
  * Overwriten Metadata update listener for ECS functionalities
  *
  * @access public
  * 
  */
 public function MDUpdateListener($a_element)
 {
     global $ilLog;
     parent::MDUpdateListener($a_element);
     $md = new ilMD($this->getId(), 0, $this->getType());
     if (!is_object($md_gen = $md->getGeneral())) {
         return false;
     }
     $title = $md_gen->getTitle();
     foreach ($md_gen->getDescriptionIds() as $id) {
         $md_des = $md_gen->getDescription($id);
         $description = $md_des->getDescription();
         break;
     }
     switch ($a_element) {
         case 'General':
             include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
             if (ilLinkResourceItems::lookupNumberOfLinks($this->getId()) == 1) {
                 $link_arr = ilLinkResourceItems::_getFirstLink($this->getId());
                 $link = new ilLinkResourceItems($this->getId());
                 $link->readItem($link_arr['link_id']);
                 $link->setTitle($title);
                 $link->setDescription($description);
                 $link->update();
             }
             break;
         default:
             return true;
     }
     return true;
 }