[xoops-cvslog 3068] CVS update: xoops2jp/html/modules/legacyRender/class

アーカイブの一覧に戻る

Minahito minah****@users*****
2006年 5月 17日 (水) 16:20:34 JST


Index: xoops2jp/html/modules/legacyRender/class/tplfile.php
diff -u xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.7 xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.8
--- xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.7	Tue Mar 28 22:30:48 2006
+++ xoops2jp/html/modules/legacyRender/class/tplfile.php	Wed May 17 16:20:34 2006
@@ -9,6 +9,8 @@
 	 */
 	var $Source = null;
 	
+	var $mOverride = null;
+	
 	function LegacyRenderTplfileObject()
 	{
 		$this->initVar('tpl_id', XOBJ_DTYPE_INT, '', true);
@@ -57,6 +59,28 @@
 		
 		return $obj;
 	}
+	
+	/**
+	 * Load override template file object by $tplset that is the name of template-set specified.
+	 * And, set it to mOverride.
+	 */
+	function loadOverride($tplset)
+	{
+		if ($tplset == 'default' || $this->mOverride != null) {
+			return;
+		}
+		
+		$handler =& xoops_getmodulehandler('tplfile', 'legacyRender');
+		
+		$criteria =& new CriteriaCompo();
+		$criteria->add(new Criteria('tpl_tplset', $tplset));
+		$criteria->add(new Criteria('tpl_file', $this->get('tpl_file')));
+		
+		$objs =& $handler->getObjects($criteria);
+		if (count($objs) > 0) {
+			$this->mOverride =& $objs[0];
+		}
+	}
 }
 
 class LegacyRenderTplfileHandler extends XoopsObjectGenericHandler


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る