Minahito
minah****@users*****
2006年 10月 15日 (日) 01:35:42 JST
Index: xoops2jp/html/modules/legacy/forms/ImageUploadForm.class.php diff -u xoops2jp/html/modules/legacy/forms/ImageUploadForm.class.php:1.1.2.1 xoops2jp/html/modules/legacy/forms/ImageUploadForm.class.php:1.1.2.2 --- xoops2jp/html/modules/legacy/forms/ImageUploadForm.class.php:1.1.2.1 Sat Oct 14 23:55:25 2006 +++ xoops2jp/html/modules/legacy/forms/ImageUploadForm.class.php Sun Oct 15 01:35:41 2006 @@ -3,7 +3,7 @@ if (!defined('XOOPS_ROOT_PATH')) exit(); require_once XOOPS_ROOT_PATH . "/core/XCube_ActionForm.class.php"; -require_once XOOPS_MODULE_PATH . "/base/class/Legacy_Validator.class.php"; +require_once XOOPS_MODULE_PATH . "/legacy/class/Legacy_Validator.class.php"; class Legacy_ImageUploadForm extends XCube_ActionForm { @@ -34,14 +34,14 @@ $this->mFieldProperties['image_nicename'] =& new XCube_FieldProperty($this); $this->mFieldProperties['image_nicename']->setDependsByArray(array('required')); - $this->mFieldProperties['image_nicename']->addMessage('required', _MD_BASE_ERROR_REQUIRED, _MD_BASE_LANG_IMAGE_NICENAME); + $this->mFieldProperties['image_nicename']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _MD_LEGACY_LANG_IMAGE_NICENAME); $this->mFieldProperties['imgcat_id'] =& new XCube_FieldProperty($this); $this->mFieldProperties['imgcat_id']->setDependsByArray(array('required','objectExist')); - $this->mFieldProperties['imgcat_id']->addMessage('required', _MD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_ID); - $this->mFieldProperties['imgcat_id']->addMessage('objectExist', _AD_BASE_ERROR_OBJECTEXIST, _AD_BASE_LANG_IMGCAT_ID); + $this->mFieldProperties['imgcat_id']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _AD_LEGACY_LANG_IMGCAT_ID); + $this->mFieldProperties['imgcat_id']->addMessage('objectExist', _AD_LEGACY_ERROR_OBJECTEXIST, _AD_LEGACY_LANG_IMGCAT_ID); $this->mFieldProperties['imgcat_id']->addVar('handler', 'imagecategory'); - $this->mFieldProperties['imgcat_id']->addVar('module', 'base'); + $this->mFieldProperties['imgcat_id']->addVar('module', 'legacy'); } /** @@ -62,10 +62,10 @@ $groups = array(XOOPS_GROUP_ANONYMOUS); } - $handler =& xoops_getmodulehandler('imagecategory', 'base'); + $handler =& xoops_getmodulehandler('imagecategory', 'legacy'); $imgcat =& $handler->get($imgcat_id); if (is_object($imgcat) && !$imgcat->hasUploadPerm($groups)) { - $this->addErrorMessage(_MD_BASE_ERROR_PERMISSION); + $this->addErrorMessage(_MD_LEGACY_ERROR_PERMISSION); } } } @@ -75,7 +75,7 @@ $formFile = $this->get('image_name'); if ($formFile == null && $this->_mIsNew ) { - $this->addErrorMessage(_MD_BASE_ERROR_YOU_MUST_UPLOAD); + $this->addErrorMessage(_MD_LEGACY_ERROR_YOU_MUST_UPLOAD); } } @@ -83,7 +83,7 @@ { parent::validate(); - $handler =& xoops_getmodulehandler('imagecategory', 'base'); + $handler =& xoops_getmodulehandler('imagecategory', 'legacy'); $category =& $handler->get($this->get('imgcat_id')); $formFile = $this->get('image_name'); @@ -93,14 +93,14 @@ // Imagefile width & height check. // if ($formFile->getWidth() > $category->get('imgcat_maxwidth') || $formFile->getHeight() > $category->get('imgcat_maxheight')) { - $this->addErrorMessage(XCube_Utils::formatMessage(_AD_BASE_ERROR_IMG_SIZE, $category->get('imgcat_maxwidth'), $category->get('imgcat_maxheight'))); + $this->addErrorMessage(XCube_Utils::formatMessage(_AD_LEGACY_ERROR_IMG_SIZE, $category->get('imgcat_maxwidth'), $category->get('imgcat_maxheight'))); } // // Check file size // if ($formFile->getFilesize() > $category->get('imgcat_maxsize')) { - $this->addErrorMessage(XCube_Utils::formatMessage(_AD_BASE_ERROR_IMG_FILESIZE, $category->get('imgcat_maxsize'))); + $this->addErrorMessage(XCube_Utils::formatMessage(_AD_LEGACY_ERROR_IMG_FILESIZE, $category->get('imgcat_maxsize'))); } } } @@ -120,7 +120,7 @@ $obj->set('image_display', true); $obj->set('imgcat_id', $this->get('imgcat_id')); - $handler =& xoops_getmodulehandler('imagecategory', 'base'); + $handler =& xoops_getmodulehandler('imagecategory', 'legacy'); $category =& $handler->get($this->get('imgcat_id')); $this->mFormFile = $this->get('image_name'); Index: xoops2jp/html/modules/legacy/forms/ImageFilterForm.class.php diff -u xoops2jp/html/modules/legacy/forms/ImageFilterForm.class.php:1.1.2.1 xoops2jp/html/modules/legacy/forms/ImageFilterForm.class.php:1.1.2.2 --- xoops2jp/html/modules/legacy/forms/ImageFilterForm.class.php:1.1.2.1 Sat Oct 14 23:55:25 2006 +++ xoops2jp/html/modules/legacy/forms/ImageFilterForm.class.php Sun Oct 15 01:35:41 2006 @@ -2,7 +2,7 @@ if (!defined('XOOPS_ROOT_PATH')) exit(); -require_once XOOPS_MODULE_PATH . "/base/class/AbstractFilterForm.class.php"; +require_once XOOPS_MODULE_PATH . "/legacy/class/AbstractFilterForm.class.php"; define('IMAGE_SORT_KEY_IMAGE_ID', 1); define('IMAGE_SORT_KEY_IMAGE_NAME', 2);