コード例 #1
0
 /**
  * init HTML output (level 3)
  */
 protected static function initHTML()
 {
     global $ilUser;
     if (ilContext::hasUser()) {
         // load style definitions
         // use the init function with plugin hook here, too
         self::initStyle();
     }
     // $tpl
     $tpl = new ilTemplate("tpl.main.html", true, true);
     self::initGlobal("tpl", $tpl);
     if (ilContext::hasUser() && ilContext::doAuthentication()) {
         /**
          * @var $ilUser ilObjUser
          * @var $ilCtrl ilCtrl
          */
         global $ilUser, $ilCtrl;
         require_once 'Services/User/classes/class.ilUserRequestTargetAdjustment.php';
         $request_adjuster = new ilUserRequestTargetAdjustment($ilUser, $ilCtrl);
         $request_adjuster->adjust();
     }
     // load style sheet depending on user's settings
     $location_stylesheet = ilUtil::getStyleSheetLocation();
     $tpl->setVariable("LOCATION_STYLESHEET", $location_stylesheet);
     require_once "./Services/UICore/classes/class.ilFrameTargetInfo.php";
     self::initGlobal("ilNavigationHistory", "ilNavigationHistory", "Services/Navigation/classes/class.ilNavigationHistory.php");
     self::initGlobal("ilBrowser", "ilBrowser", "./Services/Utilities/classes/class.ilBrowser.php");
     self::initGlobal("ilHelp", "ilHelpGUI", "Services/Help/classes/class.ilHelpGUI.php");
     self::initGlobal("ilToolbar", "ilToolbarGUI", "./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php");
     self::initGlobal("ilLocator", "ilLocatorGUI", "./Services/Locator/classes/class.ilLocatorGUI.php");
     self::initGlobal("ilTabs", "ilTabsGUI", "./Services/UIComponent/Tabs/classes/class.ilTabsGUI.php");
     if (ilContext::hasUser()) {
         // $ilMainMenu
         include_once './Services/MainMenu/classes/class.ilMainMenuGUI.php';
         $ilMainMenu = new ilMainMenuGUI("_top");
         self::initGlobal("ilMainMenu", $ilMainMenu);
         unset($ilMainMenu);
         // :TODO: tableGUI related
         // set hits per page for all lists using table module
         $_GET['limit'] = (int) $ilUser->getPref('hits_per_page');
         ilSession::set('tbl_limit', $_GET['limit']);
         // the next line makes it impossible to save the offset somehow in a session for
         // a specific table (I tried it for the user administration).
         // its not posssible to distinguish whether it has been set to page 1 (=offset = 0)
         // or not set at all (then we want the last offset, e.g. being used from a session var).
         // So I added the wrapping if statement. Seems to work (hopefully).
         // Alex April 14th 2006
         if (isset($_GET['offset']) && $_GET['offset'] != "") {
             $_GET['offset'] = (int) $_GET['offset'];
             // old code
         }
     } else {
         // several code parts rely on ilObjUser being always included
         include_once "Services/User/classes/class.ilObjUser.php";
     }
 }
コード例 #2
0
 /**
  * ilias initialisation
  */
 public static function initILIAS()
 {
     global $tree;
     self::initCore();
     if (ilContext::initClient()) {
         self::initClient();
         if (ilContext::hasUser()) {
             self::initUser();
             if (ilContext::doAuthentication()) {
                 self::authenticate();
             }
         }
         // init after Auth otherwise breaks CAS
         self::includePhp5Compliance();
         // language may depend on user setting
         self::initLanguage();
         $tree->initLangCode();
         if (ilContext::hasHTML()) {
             include_once './Services/WebServices/ECS/classes/class.ilECSTaskScheduler.php';
             ilECSTaskScheduler::start();
             self::initHTML();
         }
     }
 }