XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
cp_header.php
1<?php
14
15if (!defined('XOOPS_ROOT_PATH')) {
16 //
17 // Strange code? This file is used from files in admin directories having no include "mainfile.php".
18 // This is deprecated since XOOPSCube Legacy.
19 //
20
21 /*
22 * If you use open_basedir in php.ini and use file_exists for file outside open_basedir path,
23 * you will not be warned at log and file_exists returns false even if file really exists.
24 */
25 if (!file_exists('../../../mainfile.php')) {
26 if (!file_exists('../../mainfile.php')) {
27 exit();
28 }
29
30 require_once '../../mainfile.php';
31 } else {
32 require_once '../../../mainfile.php';
33 }
34}
35
36if (!defined('XOOPS_CPFUNC_LOADED')) {
37 require_once XOOPS_ROOT_PATH . '/include/cp_functions.php';
38}
39
40//
41// [Special Task] Additional CHECK!!
42// Old modules may call this file from other admin directory.
43// In this case, the controller does not have Admin Module Object.
44//
45$root =& XCube_Root::getSingleton();
46
47require_once XOOPS_ROOT_PATH . '/modules/legacy/kernel/Legacy_AdminControllerStrategy.class.php';
48$strategy =new Legacy_AdminControllerStrategy($root->mController);
49
50$root->mController->setStrategy($strategy);
51$root->mController->setupModuleContext();
52$root->mController->_mStrategy->setupModuleLanguage(); //< Umm...