Minahito
minah****@users*****
2006年 5月 29日 (月) 16:06:13 JST
Index: xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php diff -u xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.5 xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.6 --- xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.5 Thu May 25 18:30:34 2006 +++ xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php Mon May 29 16:06:13 2006 @@ -8,9 +8,11 @@ class Legacy_ImageAdminEditForm extends Legacy_ImageUploadForm { + var $_mImgcatId = 0; + function getTokenName() { - return "module.base.ImageAdminEditForm.TOKEN" . $this->get('image_id'); + return "module.base.ImageAdminEditForm.TOKEN" . $this->getImgcatId(); } function prepare() @@ -36,16 +38,19 @@ $this->mFieldProperties['image_weight']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_WEIGHT); } - function validateImgcat_id() - { - } - function load(&$obj) { parent::load($obj); $this->set('image_id', $obj->get('image_id')); $this->set('image_display', $obj->get('image_display')); $this->set('image_weight', $obj->get('image_weight')); + + $this->_mImgcatId = $obj->get('imgcat_id'); + } + + function getImgcatId() + { + return $this->_mIsNew ? $this->get('imgcat_id') : $this->_mImgcatId; } function update(&$obj)