Minahito
minah****@users*****
2006年 5月 17日 (水) 20:14:50 JST
Index: xoops2jp/html/class/XCube_ActionForm.class.php diff -u xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.32 xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.33 --- xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.32 Fri May 12 19:17:54 2006 +++ xoops2jp/html/class/XCube_ActionForm.class.php Wed May 17 20:14:50 2006 @@ -480,6 +480,8 @@ return false; } + $this->mValue->mKey = $key; + $this->mValue->fetch(); if (!$this->mValue->hasUploadFile()) { $this->mValue = null; @@ -506,6 +508,23 @@ } } +class XCube_FileArrayProperty extends XCube_AbstractArrayProperty +{ + var $mPropertyClassName = "XCube_FileProperty"; + + function fetch($key = null) + { + unset($this->mProperties); + $this->mProperties = array(); + if (isset($_FILES[$this->mName]) && is_array($_FILES[$this->mName]['name'])) { + foreach ($_FILES[$this->mName]['name'] as $_key => $_val) { + $this->mProperties[$_key] =& new $this->mPropertyClassName($this->mName); + $this->mProperties[$_key]->fetch($_key); + } + } + } +} + class XCube_ImageFileProperty extends XCube_FileProperty { function XCube_ImageFileProperty($name) @@ -515,6 +534,11 @@ } } +class XCube_ImageFileArrayProperty extends XCube_FileArrayProperty +{ + var $mPropertyClassName = "XCube_ImageFileProperty"; +} + class XCube_FieldProperty { var $mForm;