From 0fce550ab13b38161f8117e1fab283aae15de5c8 Mon Sep 17 00:00:00 2001 From: Alexander Killing Date: Fri, 2 Nov 2018 14:39:29 +0100 Subject: [PATCH] Cleanup, docu and refactoring in ilCtrl, thanks to rklees, see https://github.com/ILIAS-eLearning/ILIAS/pull/615 --- .../classes/class.ilObjBibliographicGUI.php | 1 - .../Course/classes/class.ilObjCourseGUI.php | 11 - .../OrgUnit/classes/class.ilObjOrgUnitGUI.php | 1 - .../class.ilObjStudyProgrammeAdminGUI.php | 3 +- .../classes/class.ilObjStudyProgrammeGUI.php | 1 - Modules/Wiki/classes/class.ilWikiUtil.php | 3 +- .../class.ilObjComponentSettingsGUI.php | 3 +- Services/Component/classes/class.ilPlugin.php | 7 +- Services/Init/classes/class.ilStartUpGUI.php | 3 - .../MainMenu/classes/class.ilMainMenuGUI.php | 4 - .../classes/class.ilObjMediaObjectGUI.php | 2 - Services/News/classes/class.ilNewsItemGUI.php | 2 +- .../classes/class.ilObjectPluginGUI.php | 8 - .../classes/class.ilRepositoryExplorer.php | 2 - Services/UICore/classes/class.ilCtrl.php | 478 ++++++------------ Services/UICore/classes/class.ilTemplate.php | 8 - Services/User/classes/class.ilObjUserGUI.php | 4 - ...sswordResetRequestTargetAdjustmentCase.php | 1 - confirmReg.php | 3 +- ilias.php | 1 - index.php | 1 - login.php | 1 - logout.php | 3 +- pwassist.php | 3 +- register.php | 3 +- setup/classes/class.ilCtrlStructureReader.php | 7 - shib_login.php | 3 +- sso/index.php | 3 +- 28 files changed, 180 insertions(+), 390 deletions(-) diff --git a/Modules/Bibliographic/classes/class.ilObjBibliographicGUI.php b/Modules/Bibliographic/classes/class.ilObjBibliographicGUI.php index ed38a237150b..f0139166cf8f 100644 --- a/Modules/Bibliographic/classes/class.ilObjBibliographicGUI.php +++ b/Modules/Bibliographic/classes/class.ilObjBibliographicGUI.php @@ -235,7 +235,6 @@ public static function _goto($a_target) { global $DIC; $id = explode("_", $a_target); - $DIC->ctrl()->setTargetScript("ilias.php"); $DIC->ctrl()->initBaseClass(ilRepositoryGUI::class); $DIC->ctrl()->setParameterByClass(ilObjBibliographicGUI::class, "ref_id", $id[0]); // Detail-View diff --git a/Modules/Course/classes/class.ilObjCourseGUI.php b/Modules/Course/classes/class.ilObjCourseGUI.php index 02f84a1e6941..52b075af2987 100755 --- a/Modules/Course/classes/class.ilObjCourseGUI.php +++ b/Modules/Course/classes/class.ilObjCourseGUI.php @@ -2212,17 +2212,6 @@ function getTabs() array("perm","info","owner"), 'ilpermissiongui'); } - if ($this->ctrl->getTargetScript() == "adm_object.php") - { - $this->tabs_gui->addTarget("show_owner", - $this->ctrl->getLinkTarget($this, "owner"), "owner", get_class($this)); - - if ($this->tree->getSavedNodeData($this->ref_id)) - { - $this->tabs_gui->addTarget("trash", - $this->ctrl->getLinkTarget($this, "trash"), "trash", get_class($this)); - } - } // Join/Leave if($ilAccess->checkAccess('join','',$this->ref_id) and !$this->object->getMemberObject()->isAssigned()) diff --git a/Modules/OrgUnit/classes/class.ilObjOrgUnitGUI.php b/Modules/OrgUnit/classes/class.ilObjOrgUnitGUI.php index f377d5798df0..001dda9f4de3 100644 --- a/Modules/OrgUnit/classes/class.ilObjOrgUnitGUI.php +++ b/Modules/OrgUnit/classes/class.ilObjOrgUnitGUI.php @@ -657,7 +657,6 @@ public static function _goto($ref_id) { global $DIC; $ilCtrl = $DIC['ilCtrl']; $ilCtrl->initBaseClass("ilAdministrationGUI"); - $ilCtrl->setTargetScript("ilias.php"); $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $ref_id); $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "admin_mode", self::TAB_SETTINGS); $ilCtrl->setParameterByClass("IlObjPluginDispatchGUI", "admin_mode", self::TAB_SETTINGS); diff --git a/Modules/StudyProgramme/classes/class.ilObjStudyProgrammeAdminGUI.php b/Modules/StudyProgramme/classes/class.ilObjStudyProgrammeAdminGUI.php index e1945fde79ff..e3422fa37961 100644 --- a/Modules/StudyProgramme/classes/class.ilObjStudyProgrammeAdminGUI.php +++ b/Modules/StudyProgramme/classes/class.ilObjStudyProgrammeAdminGUI.php @@ -144,7 +144,6 @@ public function getAdminTabs() { public function _goto($ref_id) { $this->ctrl->initBaseClass("ilAdministrationGUI"); - $this->ctrl->setTargetScript("ilias.php"); $this->ctrl->setParameterByClass("ilObjStudyProgrammeAdminGUI", "ref_id", $ref_id); $this->ctrl->setParameterByClass("ilObjStudyProgrammeAdminGUI", "admin_mode", "settings"); $this->ctrl->redirectByClass(array( "ilAdministrationGUI", "ilObjStudyProgrammeAdminGUI" ), "view"); @@ -153,4 +152,4 @@ public function _goto($ref_id) { protected function save(ilPropertyFormGUI $a_form) { return true; } -} \ No newline at end of file +} diff --git a/Modules/StudyProgramme/classes/class.ilObjStudyProgrammeGUI.php b/Modules/StudyProgramme/classes/class.ilObjStudyProgrammeGUI.php index 72c273cc2e32..7ef5193742b7 100644 --- a/Modules/StudyProgramme/classes/class.ilObjStudyProgrammeGUI.php +++ b/Modules/StudyProgramme/classes/class.ilObjStudyProgrammeGUI.php @@ -671,7 +671,6 @@ public static function _goto($a_target) { $ilErr = $DIC['ilErr']; $ilCtrl = $DIC['ilCtrl']; $id = explode("_", $a_target); - $ilCtrl->setTargetScript("ilias.php"); $ilCtrl->initBaseClass("ilRepositoryGUI"); $ilCtrl->setParameterByClass("ilobjstudyprogrammegui", "ref_id", $id[0]); diff --git a/Modules/Wiki/classes/class.ilWikiUtil.php b/Modules/Wiki/classes/class.ilWikiUtil.php index 79235fa4217d..171c5fa327e0 100755 --- a/Modules/Wiki/classes/class.ilWikiUtil.php +++ b/Modules/Wiki/classes/class.ilWikiUtil.php @@ -511,7 +511,6 @@ static function makeLink( &$nt, $a_wiki_id, $text = '', $query = '', $trail = '' } } -//$ilCtrl->debug("ilWikiUtil::makeLink:-$inside-$trail-"); /* if ( $nt->isExternal() ) { $nr = array_push( $this->mInterwikiLinkHolders['texts'], $prefix.$text.$inside ); $this->mInterwikiLinkHolders['titles'][] = $nt; @@ -779,4 +778,4 @@ static function sendNotification($a_action, $a_type, $a_wiki_ref_id, $a_page_id, } } -?> \ No newline at end of file +?> diff --git a/Services/Component/classes/class.ilObjComponentSettingsGUI.php b/Services/Component/classes/class.ilObjComponentSettingsGUI.php index e877a7052d41..f3282896fd8b 100755 --- a/Services/Component/classes/class.ilObjComponentSettingsGUI.php +++ b/Services/Component/classes/class.ilObjComponentSettingsGUI.php @@ -554,7 +554,6 @@ protected function update(ilPlugin $plugin) { $ilCtrl->setParameterByClass("iladministrationgui", "cname", $_GET["cname"]); $ilCtrl->setParameterByClass("iladministrationgui", "slot_id", $_GET["slot_id"]); $ilCtrl->setParameterByClass("iladministrationgui", "plugin_id", $_GET["plugin_id"]); - $ilCtrl->setTargetScript("ilias.php"); ilUtil::redirect("ilias.php?admin_mode=settings&baseClass=ilAdministrationGUI". "&cmd=jumpToPluginSlot&ref_id=".$_GET["ref_id"]."&ctype=".$_GET["ctype"]. "&cname=".$_GET["cname"]."&slot_id=".$_GET["slot_id"]."&plugin_id=".$_GET["plugin_id"]); @@ -700,4 +699,4 @@ protected function uninstallPlugin() $ilCtrl->setParameter($this, "slot_id", $_GET["slot_id"]); $ilCtrl->redirect($this, "listPlugins"); } -} \ No newline at end of file +} diff --git a/Services/Component/classes/class.ilPlugin.php b/Services/Component/classes/class.ilPlugin.php index bc0ebc89903a..c9fe848010d7 100755 --- a/Services/Component/classes/class.ilPlugin.php +++ b/Services/Component/classes/class.ilPlugin.php @@ -993,11 +993,8 @@ public function update() { // load control structure include_once("./setup/classes/class.ilCtrlStructureReader.php"); $structure_reader = new ilCtrlStructureReader(); - $structure_reader->readStructure( - true, "./" . $this->getDirectory(), $this->getPrefix(), - $this->getDirectory() - ); - // $ilCtrl->storeCommonStructures(); + $structure_reader->readStructure(true, "./".$this->getDirectory(), $this->getPrefix(), + $this->getDirectory()); // add config gui to the ctrl calls $ilCtrl->insertCtrlCalls( diff --git a/Services/Init/classes/class.ilStartUpGUI.php b/Services/Init/classes/class.ilStartUpGUI.php index ddf9e268f592..98659c732807 100755 --- a/Services/Init/classes/class.ilStartUpGUI.php +++ b/Services/Init/classes/class.ilStartUpGUI.php @@ -214,8 +214,6 @@ protected function showLoginPage(ilPropertyFormGUI $form = null) $tpl->setVariable("PAGETITLE", "- ".$this->lng->txt("startpage")); $tpl->setVariable("ILIAS_RELEASE", $ilSetting->get("ilias_version")); - $this->ctrl->setTargetScript("ilias.php"); - // check expired session and send message if($GLOBALS['DIC']['ilAuthSession']->isExpired()) { @@ -474,7 +472,6 @@ protected function showLogin() $tpl->setVariable("PAGETITLE", "- ".$lng->txt("startpage")); $tpl->setVariable("ILIAS_RELEASE", $ilSetting->get("ilias_version")); - $this->ctrl->setTargetScript("ilias.php"); $tpl->setVariable("PHP_SELF", $_SERVER['PHP_SELF']); // browser does not accept cookies diff --git a/Services/MainMenu/classes/class.ilMainMenuGUI.php b/Services/MainMenu/classes/class.ilMainMenuGUI.php index 481095a90536..c9b370432e9b 100755 --- a/Services/MainMenu/classes/class.ilMainMenuGUI.php +++ b/Services/MainMenu/classes/class.ilMainMenuGUI.php @@ -565,16 +565,12 @@ private function renderHelpButtons() { // always set ajax url - $ts = $ilCtrl->getTargetScript(); - $ilCtrl->setTargetScript("ilias.php"); - $ilHelp->setCtrlPar(); $this->main_tpl->addOnLoadCode( "il.Help.setAjaxUrl('" . $ilCtrl->getLinkTargetByClass("ilhelpgui", "", "", true) . "');" ); - $ilCtrl->setTargetScript($ts); } } diff --git a/Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php b/Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php index 91841e2549b3..44b399842ba3 100755 --- a/Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php +++ b/Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php @@ -1874,7 +1874,6 @@ function setTabs() // catch feedback message $this->getTabs(); - //$tabs_gui->setTargetScript($this->ctrl->getLinkTarget($this)); $this->tpl->clearHeader(); if (is_object($this->object) && strtolower(get_class($this->object)) == "ilobjmediaobject") { @@ -1899,7 +1898,6 @@ function getTabs() $ilHelp->setScreenIdComponent("mob"); - //$this->tabs_gui->setTargetScript($this->ctrl->getLinkTarget($this)); if (is_object($this->object) && strtolower(get_class($this->object)) == "ilobjmediaobject" && $this->object->getId() > 0) { diff --git a/Services/News/classes/class.ilNewsItemGUI.php b/Services/News/classes/class.ilNewsItemGUI.php index e891dc76d0ea..6811e7afc5c8 100755 --- a/Services/News/classes/class.ilNewsItemGUI.php +++ b/Services/News/classes/class.ilNewsItemGUI.php @@ -739,7 +739,7 @@ function setTabs() $ilTabs->clearTargets(); $ilTabs->setBackTarget($lng->txt("back"), - $ilCtrl->getParentReturnByClass("ilnewsitemgui")); + $ilCtrl->getParentReturn($this)); } /** diff --git a/Services/Repository/classes/class.ilObjectPluginGUI.php b/Services/Repository/classes/class.ilObjectPluginGUI.php index e03cf98631d2..674c2d942bba 100644 --- a/Services/Repository/classes/class.ilObjectPluginGUI.php +++ b/Services/Repository/classes/class.ilObjectPluginGUI.php @@ -382,14 +382,8 @@ function afterSave(ilObject $newObj) ilUtil::sendSuccess($this->lng->txt("object_added"),true); $ilCtrl->initBaseClass("ilObjPluginDispatchGUI"); - $ilCtrl->setTargetScript("ilias.php"); $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI")); -//var_dump($ilCtrl->call_node); -//var_dump($ilCtrl->forward); -//var_dump($ilCtrl->parent); -//var_dump($ilCtrl->root_class); - $ilCtrl->setParameterByClass(get_class($this), "ref_id", $newObj->getRefId()); $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", get_class($this)), $this->getAfterCreationCmd()); } @@ -509,7 +503,6 @@ public static function _goto($a_target) if ($ilAccess->checkAccess("read", "", $ref_id)) { $ilCtrl->initBaseClass("ilObjPluginDispatchGUI"); - $ilCtrl->setTargetScript("ilias.php"); $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI")); $ilCtrl->setParameterByClass($class_name, "ref_id", $ref_id); $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", $class_name), ""); @@ -517,7 +510,6 @@ public static function _goto($a_target) else if($ilAccess->checkAccess("visible", "", $ref_id)) { $ilCtrl->initBaseClass("ilObjPluginDispatchGUI"); - $ilCtrl->setTargetScript("ilias.php"); $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI")); $ilCtrl->setParameterByClass($class_name, "ref_id", $ref_id); $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", $class_name), "infoScreen"); diff --git a/Services/Repository/classes/class.ilRepositoryExplorer.php b/Services/Repository/classes/class.ilRepositoryExplorer.php index c3ff7de333ec..8ddf4722f975 100755 --- a/Services/Repository/classes/class.ilRepositoryExplorer.php +++ b/Services/Repository/classes/class.ilRepositoryExplorer.php @@ -130,8 +130,6 @@ function buildLinkTarget($a_node_id, $a_type) { $ilCtrl = $this->ctrl; - $ilCtrl->setTargetScript("ilias.php"); - switch($a_type) { case "cat": diff --git a/Services/UICore/classes/class.ilCtrl.php b/Services/UICore/classes/class.ilCtrl.php index 437255447f78..5f13907eec3a 100755 --- a/Services/UICore/classes/class.ilCtrl.php +++ b/Services/UICore/classes/class.ilCtrl.php @@ -1,6 +1,7 @@ > + */ + protected $save_parameter; + + /** + * Maps lowercase class names to lists of parameters set for them. + * + * See saveParameter/setParameter for difference to save_parameter. + * + * This is used in: setParameter, setParameterByClass, getParameterArrayByClass + * + * @var array + */ + protected $parameter; + + /** + * Return commands per class. + * + * TODO: What is this? + * + * This is used in: setReturn, setReturnByClass, getParentReturnByClass, searchReturnClass + * + * @var array + */ + protected $return; + + /** + * Stores the order in which different GUI classes were called. + * + * TODO: Might better be called call_stack. + * + * This is used in: forwardCommand, getHTML, getCallHistory + */ + protected $call_hist = array(); // calling history + + /** + * Stores which class calls which other class. + * + * This is used in: getNodeIdForTargetClass, fetchCallsOfClassFromCache, callOfClassNotKnown + */ + protected $calls = array(); + + /** + * Request token, prevents XSS. + * + * This is used in: getRequestToken + * + * @var string + */ + protected $rtoken = false; + + /** + * Base script for link targets, reloads and so on + * @var string + */ + protected $target_script = "ilias.php"; /** * control class constructor */ function __construct() { - // initialisation - $this->init(); - + $this->initializeMemberVariables(); + // this information should go to xml files one day $this->stored_trees = array ("ilrepositorygui", "ilpersonaldesktopgui", @@ -49,38 +103,17 @@ function __construct() } /** - * Collect debugging strings (@deprecated) - * - * @param string debug message - */ - function debug($str) - { - $this->debug[] = $str; - } - - /** - * Get debug message string (@deprecated) + * Initialize member variables. + * + * This is used in __construct and initBaseClass. * - * @return array array of debug strings + * @return null */ - function getDebug() + protected function initializeMemberVariables() { - return $this->debug; - } - - /** - * initialisation - */ - function init() - { - $this->transit = array(); - $this->forward = array(); // forward array - $this->forwards = array(); // forward array - $this->parent = array(); // parent array (reverse forward) - $this->save_parameter = array(); // save parameter array + $this->save_parameter = array(); $this->parameter = array(); // save parameter array $this->return = array(); // return commmands - $this->location = array(); $this->tab = array(); $this->current_node = 0; $this->module_dir = ""; @@ -105,10 +138,6 @@ function callBaseClass() $module_class = ilCachedCtrl::getInstance(); $mc_rec = $module_class->lookupModuleClass($baseClass); - // get class information -// $mc_set = $ilDB->query("SELECT * FROM module_class WHERE LOWER(class) = ". -// $ilDB->quote($baseClass, "text")); -// $mc_rec = $ilDB->fetchAssoc($mc_set); $module = $mc_rec["module"]; $class = $mc_rec["class"]; @@ -124,10 +153,6 @@ function callBaseClass() } else // check whether class belongs to a service { -// $mc_set = $ilDB->query("SELECT * FROM service_class WHERE LOWER(class) = ". -// $ilDB->quote($baseClass, "text")); -// $mc_rec = $ilDB->fetchAssoc($mc_set); - $mc_rec = $module_class->lookupServiceClass($baseClass); $service = $mc_rec["service"]; @@ -141,11 +166,6 @@ function callBaseClass() $baseClass."
".str_replace("&", "
&", htmlentities($_SERVER["REQUEST_URI"]))); } - // get service information -// $m_set = $ilDB->query("SELECT * FROM il_component WHERE name = ". -// $ilDB->quote($service, "text")); -// $m_rec = $ilDB->fetchAssoc($m_set); - $m_rec = ilComponent::getComponentInfo('Services', $service); $this->service_dir = $m_rec["type"]."/".$m_rec["name"]; @@ -179,7 +199,6 @@ function getModuleDir() function forwardCommand($a_gui_object) { $class = strtolower(get_class($a_gui_object)); -//echo "
class:".$class.":"; $nr = $this->getNodeIdForTargetClass($this->current_node, $class); $nr = $nr["node_id"]; if ($nr != "") @@ -193,7 +212,6 @@ function forwardCommand($a_gui_object) $this->call_hist[] = array("class" => get_class($a_gui_object), "mode" => "execComm", "cmd" => $this->getCmd()); -//echo "
class:".get_class($a_gui_object).":"; $html = $a_gui_object->executeCommand(); // reset current node @@ -395,24 +413,11 @@ private function getNodeIdForTargetClass($a_par_node, $a_class, $a_check = false $module_class = ilCachedCtrl::getInstance(); $mc_rec = $module_class->lookupModuleClass($class); $n_class = $mc_rec['lower_class']; -// global $ilDB; -// -// get class information -// $mc_set = $ilDB->query("SELECT * FROM module_class WHERE LOWER(class) = ". -// $ilDB->quote($class, "text")); -// $mc_rec = $ilDB->fetchAssoc($mc_set); -// $n_class = strtolower($mc_rec["class"]); if ($n_class == "") { $mc_rec = $module_class->lookupServiceClass($class); $n_class = $mc_rec['lower_class']; - -// $mc_set = $ilDB->query("SELECT * FROM service_class WHERE LOWER(class) = ". -// $ilDB->quote($class, "text")); -// $mc_rec = $ilDB->fetchAssoc($mc_set); -// $n_class = strtolower($mc_rec["class"]); - } if ($n_class != "") @@ -431,17 +436,10 @@ private function getNodeIdForTargetClass($a_par_node, $a_class, $a_check = false // Please do NOT change these lines. // Developers must be aware, if they use classes unknown to the controller // otherwise certain problem will be extremely hard to track down... - -// echo "ERROR: Can't find target class $a_class for node $a_par_node ". -// "(".$this->cid_class[$this->getParentCidOfNode($a_par_node)].").
"; + error_log( "ERROR: Can't find target class $a_class for node $a_par_node ". "(".$this->cid_class[$this->getParentCidOfNode($a_par_node)].")"); - if (DEVMODE == 1) - { -// ilUtil::printBacktrace(); - } - include_once("./Services/UICore/exceptions/class.ilCtrlException.php"); throw new ilCtrlException("ERROR: Can't find target class $a_class for node $a_par_node ". "(".$this->cid_class[$this->getParentCidOfNode($a_par_node)].")."); @@ -490,29 +488,6 @@ function getCmdNode() return $_GET["cmdNode"]; } - /** - * Add a location to the locator array (@deprecated, use $ilLocator) - * - * @param string $a_title link text - * @param string $a_link link - * @param string $a_target target frame - */ - function addLocation($a_title, $a_link, $a_target = "", $a_ref_id = 0) - { - $this->location[] = array("title" => $a_title, - "link" => $a_link, "target" => $a_target, "ref_id" => $a_ref_id); - } - - /** - * Get locations array (@deprecated, use $ilLocator) - * - * @return array array of locations (array("title", "link", "target")) - */ - function getLocations() - { - return $this->location; - } - /** * Add a tab to tabs array (@deprecated use $ilTabs) * @@ -540,12 +515,13 @@ function getTabs() } /** - * Get controller call history. This is used for - * the developer mode and presented in the footer + * Get controller call history. + * + * This is used for the developer mode and presented in the footer * * @return array array of call history entries */ - function getCallHistory() + public function getCallHistory() { return $this->call_hist; } @@ -557,7 +533,6 @@ function getCallHistory() * gui class. Example: * * include_once "classes/class.ilRepositoryGUI.php"; - * $ilCtrl->setTargetScript("ilias.php"); * $ilCtrl->getCallStructure("ilrepositorygui"); * $repository_gui = new ilRepositoryGUI(); * $ilCtrl->forwardCommand($repository_gui); @@ -571,31 +546,6 @@ function getCallStructure($a_class) $this->readClassInfo($a_class); } - /** - * stores often used common call structures (called - * from db_update script!!!) - */ -/* function storeCommonStructures() - { - global $ilDB; - - $ilDB->manipulate("DELETE FROM ctrl_structure"); - - foreach ($this->stored_trees as $root_gui_class) - { - $this->call_node = array(); - $this->forward = array(); - $this->parent = array(); - $this->readCallStructure($root_gui_class); - $ilDB->insert("ctrl_structure", array( - "root_class" => array("text", $root_gui_class), - "call_node" => array("text", serialize($this->call_node)), - "forward" => array("text", serialize($this->forward)), - "parent" => array("clob", serialize($this->parent)))); - } - } -*/ - /** * Reads call structure from db */ @@ -612,7 +562,6 @@ function readCallStructure($a_class, $a_nr = 0, $a_parent = 0) // determine call node structure $this->call_node[$a_nr] = array("class" => $a_class, "parent" => $a_parent); -//echo "
nr:$a_nr:class:$a_class:parent:$a_parent:"; $call_set = $ilDB->query("SELECT * FROM ctrl_calls WHERE parent = ". $ilDB->quote(strtolower($a_class), "text"). " ORDER BY child", array("text")); @@ -622,68 +571,18 @@ function readCallStructure($a_class, $a_nr = 0, $a_parent = 0) $a_nr = $this->readCallStructure($call_rec["child"], $a_nr, $a_parent); $forw[] = $call_rec["child"]; } - - // determin forward and parent array - $this->forwards($a_class, $forw); -//echo "
forwards:".$a_class."
"; var_dump($forw); // determine root class $this->root_class = $a_class; return $a_nr; } - - /** - * Stores which classes forwards commands to which other classes. - * - * @param string $a_from_class source class name - * @param string $a_to_class target class name - */ - private function forwards($a_from_class, $a_to_class) - { - $a_from_class = strtolower($a_from_class); - - if (is_array($a_to_class)) - { - foreach($a_to_class as $to_class) - { - if ($a_from_class != "" && $to_class != "") - { - if (!is_array($this->forward[$a_from_class]) || !in_array(strtolower($to_class), $this->forward[$a_from_class])) - { - $this->forward[$a_from_class][] = strtolower($to_class); - } - if (!is_array($this->parent[strtolower($to_class)]) || !in_array($a_from_class, $this->parent[strtolower($to_class)])) - { - $this->parent[strtolower($to_class)][] = $a_from_class; - } - } - } - } - else - { - $to_class = $a_to_class; - if ($a_from_class != "" && $to_class != "") - { - if (!is_array($this->forward[$a_from_class]) || !in_array(strtolower($to_class), $this->forward[$a_from_class])) - { - $this->forward[$a_from_class][] = strtolower($to_class); - } - if (!is_array($this->parent[strtolower($to_class)]) || !in_array($a_from_class, $this->parent[strtolower($to_class)])) - { - $this->parent[strtolower($to_class)][] = $a_from_class; - } - } - } - } - - /** * Set parameters that should be passed in every form and link of a * gui class. All links that relate to the specified gui object class and * are build e.g. by using getLinkTarger() or getFormAction() will include * this parameter. This is the mechanism to add url parameters to the standard - * url (which is set by the setTargetScript() method) target everytime. + * url target everytime. * * A typical example is the "ref_id" that should be included in almost every * link or form action url. So the constructor of ilRepositoryGUI includes @@ -732,9 +631,9 @@ function saveParameterByClass($a_class, $a_parameter) * gui class. All links that relate to the specified gui object class and * are build e.g. by using getLinkTarger() or getFormAction() will include * this parameter. This is the mechanism to add url parameters to the standard - * url (which is set by the setTargetScript() method) target. The difference - * to the saveParameter() method is, that setParameter() does not simply - * forward the url parameter of the last request. You can set a spefific value. + * url target. The difference to the saveParameter() method is, that setParameter() + * does not simply forward the url parameter of the last request. You can set + * a spefific value. * * If this parameter is also a "saved parameter" (set by saveParameter() method) * the saved value will be overwritten. @@ -891,7 +790,6 @@ protected function checkLPSettingsForward($a_gui_obj, $a_cmd_node) function getNextClass($a_gui_class = null) { $cmdNode = $this->getCmdNode(); -//echo "
getNextClass (current node: ".$this->current_node."; cmd node: ".$cmdNode.") "; if ($cmdNode == "") { return ($class = $this->checkLPSettingsForward($a_gui_class, $cmdNode)) @@ -902,8 +800,6 @@ function getNextClass($a_gui_class = null) { if ($this->current_node == $cmdNode) { -//echo "1:".$this->call_node[$cmdNode]["class"]."
"; - //return $this->call_node[$cmdNode]["class"]; return ($class = $this->checkLPSettingsForward($a_gui_class, $cmdNode)) ? $class : ""; @@ -911,10 +807,7 @@ function getNextClass($a_gui_class = null) else { $path = $this->getPathNew($this->current_node, $cmdNode); -//var_dump($path); -//echo " - Next Node: ".$path[1]; $this->readCidInfo($this->getCurrentCidOfNode($path[1])); -//echo ":".$this->cid_class[$this->getCurrentCidOfNode($path[1])].":".$this->getCurrentCidOfNode($path[1]).":"; return $this->cid_class[$this->getCurrentCidOfNode($path[1])]; } } @@ -933,10 +826,6 @@ function lookupClassPath($a_class_name) $cached_ctrl = ilCachedCtrl::getInstance(); $class_rec = $cached_ctrl->lookupClassFile($a_class_name); - //$class_set = $ilDB->query("SELECT * FROM ctrl_classfile WHERE class = ". - // $ilDB->quote($a_class_name, "text")); - //$class_rec = $ilDB->fetchAssoc($class_set); - if ($class_rec["plugin_path"] != "") { return $class_rec["plugin_path"]."/".$class_rec["filename"]; @@ -972,9 +861,6 @@ function getClassForClasspath($a_class_path) */ private function getPathNew($a_source_node, $a_target_node) { -//if ($this->getCmdClass() == "ilmailfoldergui") echo "-".$a_source_node."-".$a_target_node."-"; -//echo "-".$a_source_node."-".$a_target_node."-"; -//echo "
:::$a_source_node:::"; if ($a_source_node == "1") { $a_source_node = ""; @@ -991,7 +877,6 @@ private function getPathNew($a_source_node, $a_target_node) $GLOBALS['ilLog']->write(__METHOD__.' '.$failure); $this->redirectToURL('./ilias.php?baseClass=ilRepositoryGUI'); } -//echo "
:::$a_source_node:::"; $temp_node = $a_source_node; $path = array(); @@ -1004,7 +889,6 @@ private function getPathNew($a_source_node, $a_target_node) ? 0 : strlen($a_source_node) + 1; $diff = substr($a_target_node, $diffstart); -//echo "=$diff=$diffstart="; $diff_arr = explode(":", $diff); foreach($diff_arr as $cid) { @@ -1015,8 +899,6 @@ private function getPathNew($a_source_node, $a_target_node) $temp_node.= $cid; $path[] = $temp_node; } -//if ($this->getCmdClass() == "ilmailfoldergui") var_dump($path); -//var_dump($path); return $path; } @@ -1025,7 +907,7 @@ private function getPathNew($a_source_node, $a_target_node) * * @param string $a_target_script target script name */ - public function setTargetScript($a_target_script) + public function setTargetScript(string $a_target_script) { $this->target_script = $a_target_script; } @@ -1036,7 +918,7 @@ public function setTargetScript($a_target_script) * * @return string target script name */ - public function getTargetScript() + public function getTargetScript(): string { return $this->target_script; } @@ -1046,7 +928,7 @@ public function getTargetScript() * Initialises new base class * * Note: this resets the whole current ilCtrl context completely. - * You can call setTargetScript() and callBaseClass() after that. + * You can call callBaseClass() after that. * * @param string base class name */ @@ -1056,7 +938,7 @@ public function initBaseClass($a_base_class) $_GET["cmd"] = ""; $_GET["cmdClass"] = ""; $_GET["cmdNode"] = ""; - $this->init(); + $this->initializeMemberVariables(); } /** @@ -1281,13 +1163,11 @@ public function getRequestToken() $ilDB->quote($ilUser->getId(), "integer"). " AND session_id = ".$ilDB->quote(session_id(), "text")); $rec = $ilDB->fetchAssoc($res); -//echo session_id(); if ($rec["token"] != "") { $this->rtoken = $rec["token"]; return $rec["token"]; } -//echo "new rtoken, new entry for :".$ilUser->getId().":".session_id().":"; exit; $this->rtoken = md5(uniqid(rand(), true)); // delete entries older than one and a half days @@ -1313,7 +1193,6 @@ public function getRequestToken() $ilDB->quote(session_id(), "text").")"); return $this->rtoken; } - //$this->rtoken = md5(uniqid(rand(), true)); } return ""; } @@ -1336,7 +1215,6 @@ private function verifyToken() { if ($_GET["rtoken"] == "") { - #echo "ilCtrl::No Request Token Given!"; // for debugging, maybe changed later return false; } @@ -1345,13 +1223,6 @@ private function verifyToken() " token = ".$ilDB->quote($_GET[self::IL_RTOKEN_NAME]), "text"); if ($ilDB->numRows($set) > 0) { - // remove used token - /* - $ilDB->query("DELETE FROM il_request_token WHERE ". - " user_id = ".$ilDB->quote($ilUser->getId())." AND ". - " token = ".$ilDB->quote($_GET[self::IL_RTOKEN_NAME])); - */ - // remove tokens from older sessions // if we do this immediately, working with multiple windows does not work: // - window one: open form (with token a) @@ -1561,18 +1432,11 @@ function getLinkTargetByClass($a_class, $a_cmd = "", $a_anchor = "", $a_asynch $xml_style = false; } - // note: $a_class may be an array - //$a_class = strtolower($a_class); - -//echo "
getLinkTargetByClass"; $script = $this->getTargetScript(); $script = $this->getUrlParameters($a_class, $script, $a_cmd, $xml_style); if ($a_asynch) { - //$amp = $xml_style - // ? "&" - // : "&"; $amp = "&"; $script.= $amp."cmdMode=asynch"; } @@ -1592,7 +1456,6 @@ function setReturn($a_gui_obj, $a_cmd) { $script = $this->getTargetScript(); $script = $this->getUrlParameters(strtolower(get_class($a_gui_obj)), $script, $a_cmd); -//echo "
setReturn:".get_class($a_gui_obj).":".$script.":
"; $this->return[strtolower(get_class($a_gui_obj))] = $script; } @@ -1606,14 +1469,13 @@ function setReturnByClass($a_class, $a_cmd) $script = $this->getTargetScript(); $script = $this->getUrlParameters($a_class, $script, $a_cmd); -//echo "
setReturn:".get_class($a_gui_obj).":".$script.":
"; $this->return[strtolower($a_class)] = $script; } /** - * Redirects to next parent class that used setReturn + * Redirects to next parent class that used setReturn. */ - function returnToParent($a_gui_obj, $a_anchor = "") + public function returnToParent($a_gui_obj, $a_anchor = "") { $script = $this->getParentReturn($a_gui_obj); @@ -1631,19 +1493,11 @@ function returnToParent($a_gui_obj, $a_anchor = "") /** - * Get current redirect source + * Get return script url. * - * @return string redirect source class + * Used in conjunction with ilTabs->setBackTarget and ilBlockGUI->addHeaderCommand. */ - function getRedirectSource() - { - return $_GET["redirectSource"]; - } - - /** - * Get return script url - */ - function getParentReturn($a_gui_obj) + public function getParentReturn($a_gui_obj) { return $this->getParentReturnByClass(strtolower(get_class($a_gui_obj))); } @@ -1651,26 +1505,28 @@ function getParentReturn($a_gui_obj) /** * Get return script url + * + * Only used in getParentReturn. */ - function getParentReturnByClass($a_class) + protected function getParentReturnByClass($a_class) { $a_class = strtolower($a_class); $ret_class = $this->searchReturnClass($a_class); -//echo ":$ret_class:"; if($ret_class) { -//echo ":".$this->return[$ret_class].":"; return $this->return[$ret_class]; } } /** - * Get return class + * Get return class. * - * @param - * @return + * Only used in COPage/ilPCParagraphGUI and COPage/ilPCPlaceHolderGUI + * + * @param string|object $class + * @return string|bool */ - function getReturnClass($a_class) + public function getReturnClass($a_class) { if (is_object($a_class)) { @@ -1705,14 +1561,21 @@ private function searchReturnClass($a_class) return false; } + /** + * Get current redirect source + * + * @return string redirect source class + */ + function getRedirectSource() + { + return $_GET["redirectSource"]; + } + /** * Get URL parameters for a class and append them to a string */ public function getUrlParameters($a_class, $a_str, $a_cmd = "", $xml_style = false) { - // note: $a_class may be an array! - //$a_class = strtolower($a_class); - $params = $this->getParameterArrayByClass($a_class, $a_cmd); foreach ($params as $par => $value) @@ -1820,16 +1683,20 @@ public function getParameterArrayByClass($a_class, $a_cmd = "") return $params; } + private function classCidUnknown($a_class) { + return $this->class_cid[$a_class] == ""; + } + /** - * Get Cid for Class + * Get class id for class after fetching and storing corresponding information, if necessary. */ private function getCidForClass($a_class, $a_check = false) { - if ($this->class_cid[$a_class] == "") + if ($this->classCidUnknown($a_class)) { $this->readClassInfo($a_class); } - if ($this->class_cid[$a_class] == "") + if ($this->classCidUnknown($a_class)) { if ($a_check) { @@ -1847,16 +1714,21 @@ private function getCidForClass($a_class, $a_check = false) return $this->class_cid[$a_class]; } + private function cidClassUnknown($a_cid) { + return $this->cid_class[$a_cid] == ""; + } + + /** - * Get class for cid + * Get class for class id after fetching and storing corresponding information, if necessary. */ private function getClassForCid($a_cid) { - if ($this->cid_class[$a_cid] == "") + if ($this->cidClassUnknown($a_cid)) { $this->readCidInfo($a_cid); } - if ($this->cid_class[$a_cid] == "") + if ($this->cidClassUnknown($a_cid)) { include_once("./Services/UICore/exceptions/class.ilCtrlException.php"); throw new ilCtrlException("Cannot find class for cid ".$a_cid."."); @@ -1864,9 +1736,18 @@ private function getClassForCid($a_cid) return $this->cid_class[$a_cid]; } + private function fetchCallsOfClassFromCache($a_class, ilCachedCtrl $a_cached_ctrl) { + foreach($a_cached_ctrl->lookupCall($a_class) as $call) { + if ($call["child"] != "" && $this->callOfClassNotKnown($a_class,$call['child'])) { + $this->calls[$a_class][] = $call["child"]; + } + } + } + /** - * Read information of class per cid - * @return + * Save class respective to $a_cid and store corresponding + * class calls for future reference. + * * @param object $a_cid cid */ private function readCidInfo($a_cid) @@ -1877,47 +1758,36 @@ private function readCidInfo($a_cid) } $cached_ctrl = ilCachedCtrl::getInstance(); - $rec = $cached_ctrl->lookupCid($a_cid); + $cid_info = $cached_ctrl->lookupCid($a_cid); - if($rec) + if($cid_info) { - $this->cid_class[$a_cid] = $rec["class"]; - $this->class_cid[$rec["class"]] = $a_cid; - - $calls = $cached_ctrl->lookupCall($rec["class"]); - - foreach($calls as $rec2) - { - if (!isset($this->calls[$rec["class"]]) || !is_array($this->calls[$rec["class"]]) || !in_array($rec2["child"], $this->calls[$rec["class"]])) - { - if ($rec2["child"] != "") - { - $this->calls[$rec["class"]][] = $rec2["child"]; - } - } - } - $this->info_read_class[$rec["class"]] = true; + $this->updateClassCidMap($cid_info['class'], $a_cid); + $this->fetchCallsOfClassFromCache($cid_info['class'], $cached_ctrl); + $this->info_read_class[$cid_info["class"]] = true; } $this->info_read_cid[$a_cid] = true; } /** - * Read info of node - * - * @param object $a_class class name + * Save classes respective to the class id's of a node and store corresponding + * class calls for future reference. + * + * @param string $a_node */ private function readNodeInfo($a_node) { - $n_arr = explode(":", $a_node); - foreach ($n_arr as $cid) + $class_ids = explode(":", $a_node); + foreach ($class_ids as $cid) { $this->readCidInfo($cid); } } /** - * Read info of class + * Save class id respective to $a_class and store corresponding + * class calls for future reference. * * @param object $a_class class name */ @@ -1930,50 +1800,40 @@ private function readClassInfo($a_class) } $cached_ctrl = ilCachedCtrl::getInstance(); - $rec = $cached_ctrl->lookupClassFile($a_class); - + $class_info = $cached_ctrl->lookupClassFile($a_class); -// $set = $ilDB->query("SELECT * FROM ctrl_classfile ". -// " WHERE class = ".$ilDB->quote($a_class, "text") -// ); -// if ($rec = $ilDB->fetchAssoc($set)) - if($rec) + if($class_info) { - $this->cid_class[$rec["cid"]] = $a_class; - $this->class_cid[$a_class] = $rec["cid"]; - } - -// $set = $ilDB->query("SELECT * FROM ctrl_calls ". -// " WHERE parent = ".$ilDB->quote($a_class, "text") -// ); - $recs = $cached_ctrl->lookupCall($a_class); -// while ($rec = $ilDB->fetchAssoc($set)) - foreach($recs as $rec) - { - if (!isset($this->calls[$a_class]) || !is_array($this->calls[$a_class]) || !in_array($rec["child"], $this->calls[$a_class])) - { - if ($rec["child"] != "") - { - $this->calls[$a_class][] = $rec["child"]; - } - } + $this->updateClassCidMap($a_class,$class_info['cid']); } + $this->fetchCallsOfClassFromCache($a_class, $cached_ctrl); $this->info_read_class[$a_class] = true; $this->info_read_cid[$this->class_cid[$a_class]] = true; } + private function callOfClassNotKnown($a_class, $a_child) { + return !isset($this->calls[$a_class]) + || !is_array($this->calls[$a_class]) + || !in_array($a_child, $this->calls[$a_class]); + } + + private function updateClassCidMap($a_class, $a_cid) { + $this->cid_class[$a_cid] = $a_class; + $this->class_cid[$a_class] = $a_cid; + } + /** - * Get last but one cid of node id + * Get 2nd to last class id of node */ private function getParentCidOfNode($a_node) { - $n_arr = explode(":", $a_node); - return $n_arr[count($n_arr) - 2]; + $class_ids = explode(":", $a_node); + return $class_ids[count($class_ids) - 2]; } /** - * Remove last cid of node + * Remove the class id that comes at the beginning the sequence. */ private function removeLastCid($a_node) { @@ -1982,7 +1842,7 @@ private function removeLastCid($a_node) } /** - * Get last cid of node id + * Get cid of node */ private function getCurrentCidOfNode($a_node) { @@ -2022,6 +1882,4 @@ function insertCtrlCalls($a_parent, $a_child, $a_comp_prefix) $ilDB->quote($a_comp_prefix, "text"). ")"); } - } -?> diff --git a/Services/UICore/classes/class.ilTemplate.php b/Services/UICore/classes/class.ilTemplate.php index bc0fc9537fa7..eb2994ee4ae5 100755 --- a/Services/UICore/classes/class.ilTemplate.php +++ b/Services/UICore/classes/class.ilTemplate.php @@ -1060,14 +1060,6 @@ function addILIASFooter() $ftpl->setCurrentBlock("call_history"); $ftpl->parseCurrentBlock(); - // debug hack - $debug = $ilCtrl->getDebug(); - foreach($debug as $d) - { - $ftpl->setCurrentBlock("c_entry"); - $ftpl->setVariable("C_ENTRY", $d); - $ftpl->parseCurrentBlock(); - } $ftpl->setCurrentBlock("call_history"); $ftpl->parseCurrentBlock(); } diff --git a/Services/User/classes/class.ilObjUserGUI.php b/Services/User/classes/class.ilObjUserGUI.php index 0ca1622ff20d..546b50b42d61 100755 --- a/Services/User/classes/class.ilObjUserGUI.php +++ b/Services/User/classes/class.ilObjUserGUI.php @@ -2547,7 +2547,6 @@ public static function _goto($a_target) if($ilUser->getId() != ANONYMOUS_USER_ID && $ilUser->hasDeletionFlag()) { - $ilCtrl->setTargetScript("ilias.php"); $ilCtrl->initBaseClass("ilpersonaldesktopgui"); $ilCtrl->redirectByClass(array("ilpersonaldesktopgui", "ilpersonalsettingsgui"), "deleteOwnAccount3"); } @@ -2566,19 +2565,16 @@ public static function _goto($a_target) if('registration' == $a_target) { $_GET["baseClass"] = 'ilStartUpGUI'; - $ilCtrl->setTargetScript('ilias.php'); $ilCtrl->redirectByClass(array('ilStartUpGUI', 'ilAccountRegistrationGUI'), ''); } else if('nameassist' == $a_target) { $_GET["baseClass"] = 'ilStartUpGUI'; - $ilCtrl->setTargetScript('ilias.php'); $ilCtrl->redirectByClass(array('ilStartUpGUI', 'ilPasswordAssistanceGUI'), 'showUsernameAssistanceForm'); } else if('pwassist' == $a_target) { $_GET["baseClass"] = 'ilStartUpGUI'; - $ilCtrl->setTargetScript('ilias.php'); $ilCtrl->redirectByClass(array('ilStartUpGUI', 'ilPasswordAssistanceGUI'), ''); } else if('agreement' == $a_target) diff --git a/Services/User/classes/class.ilUserPasswordResetRequestTargetAdjustmentCase.php b/Services/User/classes/class.ilUserPasswordResetRequestTargetAdjustmentCase.php index 24ab66e014ea..3bdec093f7ba 100644 --- a/Services/User/classes/class.ilUserPasswordResetRequestTargetAdjustmentCase.php +++ b/Services/User/classes/class.ilUserPasswordResetRequestTargetAdjustmentCase.php @@ -56,7 +56,6 @@ public function shouldAdjustRequest() public function adjust() { $_GET['baseClass'] = 'ilpersonaldesktopgui'; - $this->ctrl->setTargetScript('ilias.php'); ilUtil::redirect($this->ctrl->getLinkTargetByClass(array('ilpersonaldesktopgui', 'ilpersonalsettingsgui'), 'showPassword', '', false, false)); } } diff --git a/confirmReg.php b/confirmReg.php index dde62feba912..74eed43a83f9 100644 --- a/confirmReg.php +++ b/confirmReg.php @@ -20,8 +20,7 @@ $ilCtrl->initBaseClass('ilStartUpGUI'); $ilCtrl->setCmd('confirmRegistration'); -$ilCtrl->setTargetScript('ilias.php'); $ilCtrl->callBaseClass(); exit(); -?> \ No newline at end of file +?> diff --git a/ilias.php b/ilias.php index c4831b2c2e86..7d8537a00e5f 100755 --- a/ilias.php +++ b/ilias.php @@ -17,7 +17,6 @@ global $ilCtrl, $ilBench; -$ilCtrl->setTargetScript("ilias.php"); $ilCtrl->callBaseClass(); $ilBench->save(); diff --git a/index.php b/index.php index 9aa1cd8a4a0e..c2c646d68f7f 100755 --- a/index.php +++ b/index.php @@ -43,7 +43,6 @@ ilInitialisation::initILIAS(); $ilCtrl->initBaseClass("ilStartUpGUI"); -$ilCtrl->setTargetScript("ilias.php"); $ilCtrl->callBaseClass(); $ilBench->save(); diff --git a/login.php b/login.php index 7fdfacad6139..1632decf668b 100755 --- a/login.php +++ b/login.php @@ -24,7 +24,6 @@ $ilCtrl->initBaseClass("ilStartUpGUI"); $ilCtrl->setCmd('showLoginPageOrStartupPage'); -$ilCtrl->setTargetScript("ilias.php"); $ilCtrl->callBaseClass(); $ilBench->save(); diff --git a/logout.php b/logout.php index 47f6ec131236..ea762f0859e5 100755 --- a/logout.php +++ b/logout.php @@ -15,9 +15,8 @@ $ilCtrl->initBaseClass("ilStartUpGUI"); $ilCtrl->setCmd("showLogout"); -$ilCtrl->setTargetScript("ilias.php"); $ilCtrl->callBaseClass(); $ilBench->save(); exit; -?> \ No newline at end of file +?> diff --git a/pwassist.php b/pwassist.php index f117d3193db6..7e6749153960 100755 --- a/pwassist.php +++ b/pwassist.php @@ -15,11 +15,10 @@ ilInitialisation::initILIAS(); $ilCtrl->initBaseClass("ilStartUpGUI"); -$ilCtrl->setTargetScript("ilias.php"); $ilCtrl->setCmd("jumpToPasswordAssistance"); $ilCtrl->callBaseClass(); $ilBench->save(); exit; -?> \ No newline at end of file +?> diff --git a/register.php b/register.php index 2bf04b9070c1..9b2f450bf241 100755 --- a/register.php +++ b/register.php @@ -14,10 +14,9 @@ ilInitialisation::initILIAS(); $ilCtrl->initBaseClass("ilStartUpGUI"); -$ilCtrl->setTargetScript("ilias.php"); $ilCtrl->setCmd("jumpToRegistration"); $ilCtrl->callBaseClass(); $ilBench->save(); -?> \ No newline at end of file +?> diff --git a/setup/classes/class.ilCtrlStructureReader.php b/setup/classes/class.ilCtrlStructureReader.php index 9a68d99eb101..da6495f9f78a 100755 --- a/setup/classes/class.ilCtrlStructureReader.php +++ b/setup/classes/class.ilCtrlStructureReader.php @@ -91,13 +91,6 @@ function readStructure($a_force = false, $a_dir = "", $a_comp_prefix = "", $this->ini->write(); } } - - // read module information - // not clear whether this is a good place for module reading info - // or not - include_once("./Services/UICore/classes/class.ilCtrl.php"); - $ctrl = new ilCtrl(); -// $ctrl->storeCommonStructures(); } /** diff --git a/shib_login.php b/shib_login.php index e3c5267d5abf..8513904d7df1 100755 --- a/shib_login.php +++ b/shib_login.php @@ -23,5 +23,4 @@ // authentication is done here -> $ilCtrl->initBaseClass("ilStartUpGUI"); $ilCtrl->setCmd('doShibbolethAuthentication'); -$ilCtrl->setTargetScript("ilias.php"); -$ilCtrl->callBaseClass(); \ No newline at end of file +$ilCtrl->callBaseClass(); diff --git a/sso/index.php b/sso/index.php index 69683d57a14d..a62392aa1e4c 100644 --- a/sso/index.php +++ b/sso/index.php @@ -33,5 +33,4 @@ $ilCtrl->initBaseClass("ilStartUpGUI"); $ilCtrl->setCmd('doApacheAuthentication'); -$ilCtrl->setTargetScript("ilias.php"); -$ilCtrl->callBaseClass(); \ No newline at end of file +$ilCtrl->callBaseClass();