[xoops-cvslog 6062] CVS update: xoops2jp/html/modules/legacy/admin/class

Back to archive index

NobuNobu nobun****@users*****
2006年 12月 28日 (木) 22:15:22 JST


Index: xoops2jp/html/modules/legacy/admin/class/ModuleInstallUtils.class.php
diff -u xoops2jp/html/modules/legacy/admin/class/ModuleInstallUtils.class.php:1.1.2.18 xoops2jp/html/modules/legacy/admin/class/ModuleInstallUtils.class.php:1.1.2.19
--- xoops2jp/html/modules/legacy/admin/class/ModuleInstallUtils.class.php:1.1.2.18	Sat Dec 16 17:50:25 2006
+++ xoops2jp/html/modules/legacy/admin/class/ModuleInstallUtils.class.php	Thu Dec 28 22:15:22 2006
@@ -1074,34 +1074,36 @@
 		}
 	}
 	
-	function installBlockByInfo(&$info, &$module, &$log)
-	{
-		$handler =& xoops_gethandler('block');
-		$block =& $handler->create();
-		
-		$block->set('mid', $module->get('mid'));
-		$block->set('func_num', $info->mFuncNum);
-		$block->set('options', $info->mOptions);
-		$block->set('name', $info->mName);
-		$block->set('title', $info->mName);
-		$block->set('dirname', $module->get('dirname'));
-		$block->set('func_file', $info->mFuncFile);
-		$block->set('show_func', $info->mShowFunc);
-		$block->set('edit_func', $info->mEditFunc);
-		$block->set('template', $info->mTemplate);
-		
-		if (!$handler->insert($block)) {
-			$log->addError(XCube_Utils::formatMessage(_AD_LEGACY_ERROR_COULD_NOT_INSTALL_BLOCK, $block->get('name')));
-			return false;
-		}
-		else {
-			$log->addReport(XCube_Utils::formatMessage(_AD_LEGACY_MESSAGE_BLOCK_INSTALLED, $block->get('name')));
+    function installBlockByInfo(&$info, &$module, &$log)
+    {
+        $handler =& xoops_gethandler('block');
+        $block =& $handler->create();
 
-			Legacy_ModuleInstallUtils::installBlockTemplate($block, $module, $log);
-			
-			return true;
-		}
-	}
+        $block->set('mid', $module->get('mid'));
+        $block->set('func_num', $info->mFuncNum);
+        $block->set('options', $info->mOptions);
+        $block->set('name', $info->mName);
+        $block->set('title', $info->mName);
+        $block->set('dirname', $module->get('dirname'));
+        $block->set('func_file', $info->mFuncFile);
+        $block->set('show_func', $info->mShowFunc);
+        $block->set('edit_func', $info->mEditFunc);
+        $block->set('template', $info->mTemplate);
+        $block->set('block_type', 'M');
+        $block->set('c_type', 1);
+
+        if (!$handler->insert($block)) {
+            $log->addError(XCube_Utils::formatMessage(_AD_LEGACY_ERROR_COULD_NOT_INSTALL_BLOCK, $block->get('name')));
+            return false;
+        }
+        else {
+            $log->addReport(XCube_Utils::formatMessage(_AD_LEGACY_MESSAGE_BLOCK_INSTALLED, $block->get('name')));
+
+            Legacy_ModuleInstallUtils::installBlockTemplate($block, $module, $log);
+
+            return true;
+        }
+    }
 	
 	/**
 	 * @todo Need a message in the fail case.


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