예제 #1
0
 function loadXMLInfo()
 {
     global $ilCtrlStructureReader;
     // read module and service information into db
     require_once "./setup/classes/class.ilModuleReader.php";
     require_once "./setup/classes/class.ilServiceReader.php";
     require_once "./setup/classes/class.ilCtrlStructureReader.php";
     require_once "./Services/Component/classes/class.ilModule.php";
     require_once "./Services/Component/classes/class.ilService.php";
     $modules = ilModule::getAvailableCoreModules();
     $services = ilService::getAvailableCoreServices();
     $mr = new ilModuleReader("", "", "");
     $mr->clearTables();
     foreach ($modules as $module) {
         $mr = new ilModuleReader(ILIAS_ABSOLUTE_PATH . "/Modules/" . $module["subdir"] . "/module.xml", $module["subdir"], "Modules");
         $mr->getModules();
         unset($mr);
     }
     $sr = new ilServiceReader("", "", "");
     $sr->clearTables();
     foreach ($services as $service) {
         $sr = new ilServiceReader(ILIAS_ABSOLUTE_PATH . "/Services/" . $service["subdir"] . "/service.xml", $service["subdir"], "Services");
         $sr->getServices();
         unset($sr);
     }
     $ilCtrlStructureReader->readStructure();
     return true;
 }
예제 #2
0
 /**
  * reload control structure
  */
 function reloadControlStructure()
 {
     global $ilCtrlStructureReader;
     if (!$this->setup->getClient()->db_installed) {
         ilUtil::sendInfo($this->lng->txt("no_db"), true);
         $this->displayTools();
         return;
     }
     // referencing does not work in dbupdate-script
     $GLOBALS["ilDB"] = $this->setup->getClient()->getDB();
     // BEGIN WebDAV
     // read module and service information into db
     require_once "./setup/classes/class.ilModuleReader.php";
     require_once "./setup/classes/class.ilServiceReader.php";
     require_once "./setup/classes/class.ilCtrlStructureReader.php";
     require_once "./Services/Component/classes/class.ilModule.php";
     require_once "./Services/Component/classes/class.ilService.php";
     $modules = ilModule::getAvailableCoreModules();
     $services = ilService::getAvailableCoreServices();
     // clear tables
     $mr = new ilModuleReader("", "", "");
     $mr->clearTables();
     foreach ($modules as $module) {
         $mr = new ilModuleReader(ILIAS_ABSOLUTE_PATH . "/Modules/" . $module["subdir"] . "/module.xml", $module["subdir"], "Modules");
         $mr->getModules();
         unset($mr);
     }
     // clear tables
     $sr = new ilServiceReader("", "", "");
     $sr->clearTables();
     foreach ($services as $service) {
         $sr = new ilServiceReader(ILIAS_ABSOLUTE_PATH . "/Services/" . $service["subdir"] . "/service.xml", $service["subdir"], "Services");
         $sr->getServices();
         unset($sr);
     }
     // END WebDAV
     $ilCtrlStructureReader->readStructure(true);
     ilUtil::sendInfo($this->lng->txt("ctrl_structure_reloaded"), true);
     $this->displayTools();
 }