[xoops-cvslog 2103] CVS update: xoops2jp/html/modules/base/admin/class

Back to archive index

Minahito minah****@users*****
2006年 2月 2日 (木) 21:10:42 JST


Index: xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php
diff -u xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.9 xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.10
--- xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.9	Wed Jan 25 17:02:36 2006
+++ xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php	Thu Feb  2 21:10:42 2006
@@ -323,34 +323,36 @@
 		$configHandler =& xoops_gethandler('config');
 
 		$count = 0;
-		foreach ($configInfos as $configInfo) {
-			$config =& $configHandler->createConfig();
-
-			$config->setVar('conf_modid', $module->getVar('mid'));
-			$config->setVar('conf_catid', 0);
-			$config->setVar('conf_name', $configInfo['name']);
-			$config->setVar('conf_title', $configInfo['title'], true);
-			$config->setVar('conf_desc', $configInfo['description'], true);
-			$config->setVar('conf_formtype', $configInfo['formtype'], true);
-			$config->setVar('conf_valuetype', $configInfo['valuetype'], true);
-			$config->setConfValueForInput($configInfo['default'], true);
-			$config->setVar('conf_order', $count++);
-
-			if (isset($configInfo['options']) && is_array($configInfo['options'])) {
-				foreach ($configInfo['options'] as $key => $value) {
-					$configOption =& $configHandler->createConfigOption();
-					$configOption->setVar('confop_name', $key, true);
-					$configOption->setVar('confop_value', $value, true);
-					$config->setConfOptions($configOption);
-					unset($configOption);
+		if (is_array($configInfos)) {
+			foreach ($configInfos as $configInfo) {
+				$config =& $configHandler->createConfig();
+	
+				$config->setVar('conf_modid', $module->getVar('mid'));
+				$config->setVar('conf_catid', 0);
+				$config->setVar('conf_name', $configInfo['name']);
+				$config->setVar('conf_title', $configInfo['title'], true);
+				$config->setVar('conf_desc', $configInfo['description'], true);
+				$config->setVar('conf_formtype', $configInfo['formtype'], true);
+				$config->setVar('conf_valuetype', $configInfo['valuetype'], true);
+				$config->setConfValueForInput($configInfo['default'], true);
+				$config->setVar('conf_order', $count++);
+	
+				if (isset($configInfo['options']) && is_array($configInfo['options'])) {
+					foreach ($configInfo['options'] as $key => $value) {
+						$configOption =& $configHandler->createConfigOption();
+						$configOption->setVar('confop_name', $key, true);
+						$configOption->setVar('confop_value', $value, true);
+						$config->setConfOptions($configOption);
+						unset($configOption);
+					}
 				}
+				
+				if (!$configHandler->insertConfig($config)) {
+					$log->addError("ERROR: Could not insert config " . $configInfo['name']);
+				}
+				
+				unset($config);
 			}
-			
-			if (!$configHandler->insertConfig($config)) {
-				$log->addError("ERROR: Could not insert config " . $configInfo['name']);
-			}
-			
-			unset($config);
 		}
 	}
 


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