[xoops-cvslog 1220] CVS update: xoops2jp/html/include

Back to archive index

Minahito minah****@users*****
2005年 11月 26日 (土) 16:09:19 JST


Index: xoops2jp/html/include/common.php
diff -u xoops2jp/html/include/common.php:1.4.8.11 xoops2jp/html/include/common.php:1.4.8.12
--- xoops2jp/html/include/common.php:1.4.8.11	Mon Nov 21 01:27:12 2005
+++ xoops2jp/html/include/common.php	Sat Nov 26 16:09:19 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: common.php,v 1.4.8.11 2005/11/20 16:27:12 minahito Exp $
+// $Id: common.php,v 1.4.8.12 2005/11/26 07:09:19 minahito Exp $
 //  ------------------------------------------------------------------------ //
 //              XOOPSCube - PHP Content Management System                    //
 //                  Copyright (c) 2005 XOOPS Cube.org                        //
@@ -31,24 +31,24 @@
 if (!defined("XOOPS_MAINFILE_INCLUDED"))
 	die();
 
-require_once XOOPS_ROOT_PATH."/class/XCube_Root.class.php";
-require_once XOOPS_ROOT_PATH."/class/XCube_Controller.class.php";
+require_once XOOPS_ROOT_PATH."/kernel/XCube_Root.class.php";
+require_once XOOPS_ROOT_PATH."/kernel/XCube_Controller.class.php";
 
 //
-// Load Config
+// TODO We have to move the following lines to an appropriate place.
+//      (We may not need the following constants)
 //
-$siteConfig=parse_ini_file(XOOPS_ROOT_PATH."/settings/site_default.ini.php",true);
-$customFile=XOOPS_ROOT_PATH."/settings/site_custom.ini.php";
-if(file_exists($customFile))
-	$siteConfig=array_merge($siteConfig,parse_ini_file($customFile,true));
+define("XCUBE_SITE_SETTING_FILE",XOOPS_ROOT_PATH."/settings/site_default.ini.php");
+define("XCUBE_SITE_CUSTOM_FILE",XOOPS_ROOT_PATH."/settings/site_cutom.ini.php");
 
 //
 //@todo How does the system decide the main controller?
 //
 $root=&XCube_Root::getSingleton();
-$root->setSiteConfig($siteConfig);
-$xoopsController=&$root->createController($siteConfig['Cube']['Controller.class'],$siteConfig['Cube']['Controller.path']);
+$root->loadSiteConfig(XCUBE_SITE_SETTING_FILE,XCUBE_SITE_CUSTOM_FILE);
+$root->setupController();
 
+$xoopsController=&$root->getController();
 $xoopsController->executeCommon();
 
 


xoops-cvslog メーリングリストの案内
Back to archive index