[xoops-cvslog 6267] CVS update: xoops2jp/html/core

Zurück zum Archiv-Index

Minahito minah****@users*****
2007年 3月 28日 (水) 15:33:55 JST


Index: xoops2jp/html/core/XCube_Root.class.php
diff -u xoops2jp/html/core/XCube_Root.class.php:1.1.2.7.2.1 xoops2jp/html/core/XCube_Root.class.php:1.1.2.7.2.2
--- xoops2jp/html/core/XCube_Root.class.php:1.1.2.7.2.1	Mon Feb 19 15:54:44 2007
+++ xoops2jp/html/core/XCube_Root.class.php	Wed Mar 28 15:33:55 2007
@@ -2,7 +2,7 @@
 /**
  *
  * @package XCube
- * @version $Id: XCube_Root.class.php,v 1.1.2.7.2.1 2007/02/19 06:54:44 minahito Exp $
+ * @version $Id: XCube_Root.class.php,v 1.1.2.7.2.2 2007/03/28 06:33:55 minahito Exp $
  * @copyright Copyright 2005, 2006 XOOPS Cube Project <http://xoopscube.org/>
  * @license http://xoopscube.sourceforge.net/bsd_licenses.txt Modified BSD license
  *
@@ -282,7 +282,12 @@
 		// create
 		//
 		$chunkName = $this->mSiteConfig['RenderSystems'][$name];
-		$this->_mRenderSystems[$name] =& $this->_createInstance($this->mSiteConfig[$chunkName]['class'], $this->mSiteConfig[$chunkName]['path']);
+		if (isset($this->mSiteConfig[$chunkName]['root'])) {
+			$this->_mRenderSystems[$name] =& $this->_createInstance($this->mSiteConfig[$chunkName]['class'], $this->mSiteConfig[$chunkName]['path'], $this->mSiteConfig[$chunkName]['root']);
+		}
+		else {
+			$this->_mRenderSystems[$name] =& $this->_createInstance($this->mSiteConfig[$chunkName]['class'], $this->mSiteConfig[$chunkName]['path']);
+		}
 		
 		if (!is_object($this->_mRenderSystems[$name])) {
 			die("NO");
@@ -359,15 +364,20 @@
 	 * @access private
 	 * @param $className string the name of class.
 	 * @param $classPath string the path that $className is defined in.
+	 * @param $root      string the root path instead of Cube.Root.
 	 * @return void
 	 * @todo If the file doesn't exist, require_once() raises fatal errors.
 	 */
-	function &_createInstance($className, $classPath=null)
+	function &_createInstance($className, $classPath = null, $root = null)
 	{
 		$ret = null;
 		
 		if ($classPath != null) {
-			require_once $this->mSiteConfig['Cube']['Root'] . $classPath . "/" . $className . ".class.php";
+			if ($root == null) {
+				$root = $this->mSiteConfig['Cube']['Root'];
+			}
+			
+			require_once $root . $classPath . "/" . $className . ".class.php";
 		}
 		
 		if (class_exists($className)) {


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index