[xoops-cvslog 5734] CVS update: xoops2jp/html/class/smarty/plugins

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 11月 9日 (木) 18:35:42 JST


Index: xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php
diff -u xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php:1.1.2.4 xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php:1.1.2.4.2.1
--- xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php:1.1.2.4	Fri Aug 25 20:04:27 2006
+++ xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php	Thu Nov  9 18:35:42 2006
@@ -25,6 +25,7 @@
 	$tags = "";
 	$objectArr =& $params['from'];
 	$default = isset($params['default']) ? $params['default'] : null;
+	$id = isset($params['id']) ? $params['id'] : null;
 
 	foreach ($objectArr as $object) {
 		$value = htmlspecialchars($object->get($params['value']), ENT_QUOTES);
@@ -38,7 +39,13 @@
 			$selected = " selected=\"selected\"";
 		}
 		
-		$tags .= "<option value=\"${value}\"${selected}>${label}</option>\n";
+		if ($id) {
+			$t_id = "${id}_${value}";
+			$tags .= "<option id=\"${t_id}\" value=\"${value}\"${selected}>${label}</option>\n";
+		}
+		else {
+			$tags .= "<option value=\"${value}\"${selected}>${label}</option>\n";
+		}
 	}
 	
 	print $tags;


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