예제 #1
0
<?php

include "./setup/classes/class.ilCtrlStructureReader.php";
$reader = new ilCtrlStructureReader();
$reader->getStructure();
$class_script = $reader->class_script;
$class_childs = $reader->class_childs;
foreach ($class_script as $class => $script) {
    echo "<br><br><b>{$class}: {$script}</b>";
    if (is_array($class_childs[$class])) {
        echo "<br>calls:";
        foreach ($class_childs[$class] as $child) {
            echo " " . $child;
        }
    }
}
예제 #2
0
 /**
  * Update plugin
  */
 final function update()
 {
     global $ilDB, $ilCtrl;
     ilCachedComponentData::flush();
     $result = $this->beforeUpdate();
     if ($result === false) {
         return false;
     }
     // DB update
     if ($result === true) {
         $result = $this->updateDatabase();
     }
     // Load language files
     $this->updateLanguages();
     // 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();
     // add config gui to the ctrl calls
     $ilCtrl->insertCtrlCalls("ilobjcomponentsettingsgui", ilPlugin::getConfigureClassName($this->getPluginName()), $this->getPrefix());
     // set last update version to current version
     if ($result === true) {
         $q = "UPDATE il_plugin SET last_update_version = " . $ilDB->quote($this->getVersion(), "text") . " WHERE component_type = " . $ilDB->quote($this->getComponentType(), "text") . " AND component_name = " . $ilDB->quote($this->getComponentName(), "text") . " AND slot_id = " . $ilDB->quote($this->getSlotId(), "text") . " AND name = " . $ilDB->quote($this->getPluginName(), "text");
         $ilDB->manipulate($q);
         $this->afterUpdate();
     }
     return $result;
 }
예제 #3
0
    if ($_SERVER["SCRIPT_FILENAME"] != "") {
        define("ILIAS_ABSOLUTE_PATH", substr(dirname($_SERVER["SCRIPT_FILENAME"]), 0, -6));
    } else {
        // included this due to http://education2news.blogspot.com.es/2012/06/installing-ilias-424.html
        define('ILIAS_ABSOLUTE_PATH', str_replace("/setup/include", "", dirname(__FILE__)));
    }
}
define("TPLPATH", "./templates/blueshadow");
// init session
$sess = new Session();
$lang = isset($_GET["lang"]) ? $_GET["lang"] : $_SESSION["lang"];
$_SESSION["lang"] = $lang;
// init languages
$lng = new ilLanguage($lang);
// init log
$log = new ilLog(ILIAS_ABSOLUTE_PATH, "ilias.log", "SETUP", false);
$ilLog =& $log;
// init template - in the main program please use ILIAS Template class
// instantiate main template
//$tpl = new ilTemplate("./setup/templates");
//$tpl->loadTemplatefile("tpl.main.html", true, true);
$tpl = new ilTemplate("tpl.main.html", true, true, "setup");
// make instance of structure reader
$ilCtrlStructureReader = new ilCtrlStructureReader();
$ilCtrlStructureReader->setErrorObject($ilErr);
require_once "./Services/Utilities/classes/class.ilBenchmark.php";
$ilBench = new ilBenchmark();
$GLOBALS['ilBench'] = $ilBench;
include_once "./Services/Database/classes/class.ilDBAnalyzer.php";
include_once "./Services/Database/classes/class.ilMySQLAbstraction.php";
include_once "./Services/Database/classes/class.ilDBGenerator.php";