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

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 5月 17日 (水) 20:13:22 JST


Index: xoops2jp/html/class/XCube_FormFile.class.php
diff -u xoops2jp/html/class/XCube_FormFile.class.php:1.1.2.5 xoops2jp/html/class/XCube_FormFile.class.php:1.1.2.6
--- xoops2jp/html/class/XCube_FormFile.class.php:1.1.2.5	Thu Jan 26 19:04:16 2006
+++ xoops2jp/html/class/XCube_FormFile.class.php	Wed May 17 20:13:22 2006
@@ -14,6 +14,8 @@
 class XCube_FormFile
 {
 	var $mName=null;
+	
+	var $mKey = null;
 
 	var $mContentType=null;
 
@@ -24,9 +26,10 @@
 	
 	var $mUploadFileFlag=false;
 	
-	function XCube_FormFile($name=null)
+	function XCube_FormFile($name = null, $key = null)
 	{
-		$this->mName=$name;
+		$this->mName = $name;
+		$this->mKey = $key;
 	}
 
 	/**
@@ -35,10 +38,18 @@
     function fetch()
     {
 		if($this->mName && isset($_FILES[$this->mName])) {
-			$this->setFileName($_FILES[$this->mName]['name']);
-			$this->setContentType($_FILES[$this->mName]['type']);
-			$this->setFileSize($_FILES[$this->mName]['size']);
-			$this->_mTmpFileName = $_FILES[$this->mName]['tmp_name'];
+			if ($this->mKey != null) {
+				$this->setFileName($_FILES[$this->mName]['name'][$this->mKey]);
+				$this->setContentType($_FILES[$this->mName]['type'][$this->mKey]);
+				$this->setFileSize($_FILES[$this->mName]['size'][$this->mKey]);
+				$this->_mTmpFileName = $_FILES[$this->mName]['tmp_name'][$this->mKey];
+			}
+			else {
+				$this->setFileName($_FILES[$this->mName]['name']);
+				$this->setContentType($_FILES[$this->mName]['type']);
+				$this->setFileSize($_FILES[$this->mName]['size']);
+				$this->_mTmpFileName = $_FILES[$this->mName]['tmp_name'];
+			}
 			
 			if($this->getFileSize()>0)
 				$this->mUploadFileFlag=true;


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