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

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 1月 14日 (土) 15:51:55 JST


Index: xoops2jp/html/modules/legacyRender/class/tplset.php
diff -u xoops2jp/html/modules/legacyRender/class/tplset.php:1.1.2.4 xoops2jp/html/modules/legacyRender/class/tplset.php:1.1.2.5
--- xoops2jp/html/modules/legacyRender/class/tplset.php:1.1.2.4	Sat Jan 14 03:16:17 2006
+++ xoops2jp/html/modules/legacyRender/class/tplset.php	Sat Jan 14 15:51:55 2006
@@ -1,7 +1,19 @@
 <?php
 
+class LegacyRenderModuletplObject extends XoopsSimpleObject
+{
+	function LegacyRenderModuletplObject()
+	{
+		$this->initVar('mid', XOBJ_DTYPE_INT, '', true);
+		$this->initVar('name', XOBJ_DTYPE_STRING, '', true, 150);
+		$this->initVar('dirname', XOBJ_DTYPE_STRING, '', true, 150);
+		$this->initVar('count', XOBJ_DTYPE_INT, 0, true);
+	}
+}
 class LegacyRenderTplsetObject extends XoopsSimpleObject
 {
+	var $ModuleTemplates = array();
+	
 	function LegacyRenderTplsetObject()
 	{
 		$this->initVar('tplset_id', XOBJ_DTYPE_INT, '', true);
@@ -10,6 +22,35 @@
 		$this->initVar('tplset_credits', XOBJ_DTYPE_TEXT, '', true);
 		$this->initVar('tplset_created', XOBJ_DTYPE_INT, time(), true);
 	}
+	
+	function loadModuletpl()
+	{
+		//
+		// get module list
+		//
+		$moduleHandler =& xoops_gethandler('module');
+		$modules =& $moduleHandler->getObjects();
+		
+		$tplfileHandler =& xoops_getmodulehandler('tplfile');
+		
+		foreach ($modules as $module) {
+			$modtpl =& new LegacyRenderModuletplObject();
+			
+			$modtpl->set('mid', $module->get('mid'));
+			$modtpl->set('dirname', $module->get('dirname'));
+			$modtpl->set('name', $module->get('name'));
+			
+			$criteria = new CriteriaCompo();
+			$criteria->add(new Criteria('tpl_module', $module->get('dirname')));
+			$criteria->add(new Criteria('tpl_tplset', $this->get('tplset_name')));
+			
+			$count = $tplfileHandler->getCount($criteria);
+			$modtpl->set('count', $count);
+			
+			$this->ModuleTemplates[] =& $modtpl;
+			unset($modtpl);
+		}
+	}
 }
 
 class LegacyRenderTplsetHandler extends XoopsObjectGenericHandler


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