[xoops-cvslog 3766] CVS update: xoops2jp/html/class

Back to archive index

Minahito minah****@users*****
2006年 7月 31日 (月) 18:56:29 JST


Index: xoops2jp/html/class/template.php
diff -u xoops2jp/html/class/template.php:1.2.8.6 xoops2jp/html/class/template.php:1.2.8.7
--- xoops2jp/html/class/template.php:1.2.8.6	Wed May 10 12:34:12 2006
+++ xoops2jp/html/class/template.php	Mon Jul 31 18:56:29 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: template.php,v 1.2.8.6 2006/05/10 03:34:12 minahito Exp $
+// $Id: template.php,v 1.2.8.7 2006/07/31 09:56:29 minahito Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -87,12 +87,12 @@
 							'xoops_upload_url' => XOOPS_UPLOAD_URL
 							));
 
-        // RaiseEvent 'Legacy.XoopsTpl.New' 
+        // Delegate 'XoopsTpl.New' 
         //  Delegate may define additional initialization code for XoopTpl Instance;
         //  varArgs : 
         //      'xoopsTpl'     [I/O] : $this
         //
-		$dmy =& XCube_EventUtils::quickRaiseEvent('Legacy.XoopsTpl.New',  array('xoopsTpl' => &$this));
+		XCube_DelegateUtils::call('XoopsTpl.New',  new XCube_Ref($this));
 	}
 
 	/**
@@ -258,13 +258,16 @@
  **/
 function xoops_template_touch($tpl_id, $clear_old = true)
 {
+	$result = null;
+	
     // RaiseEvent 'Legacy.XoopsTpl.TemplateTouch' 
     //  Delegate may define new template touch logic (with XC21, only for clear cache & compiled template)
     //  varArgs : 
     //      'xoopsTpl'     [I/O] : $this
     //
-	if (! $eventResult =& XCube_EventUtils::quickRaiseEvent('Legacy.XoopsTpl.TemplateTouch',
-											 array('tpl_id' => $tpl_id,'clear_old' => $clear_old,'result'=>false))) {
+    XCube_DelegateUtils::call('Legacy.XoopsTpl.TemplateTouch', $tpl_id, $clear_old, new XCube_Ref($result));
+	
+	if ($result === null) {
 		$tpl = new XoopsTpl();
 		$tpl->force_compile = true;
 		$tplfile_handler =& xoops_gethandler('tplfile');
@@ -280,7 +283,7 @@
 		}
 		return false;
 	} else {
-		return $eventResult['result'];
+		return $result;
 	}
 }
 


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