Minahito
minah****@users*****
2006年 9月 1日 (金) 12:12:40 JST
Index: xoops2jp/html/modules/base/forms/SearchResultsForm.class.php diff -u xoops2jp/html/modules/base/forms/SearchResultsForm.class.php:1.1.2.2 xoops2jp/html/modules/base/forms/SearchResultsForm.class.php:1.1.2.3 --- xoops2jp/html/modules/base/forms/SearchResultsForm.class.php:1.1.2.2 Sun May 28 14:03:36 2006 +++ xoops2jp/html/modules/base/forms/SearchResultsForm.class.php Fri Sep 1 12:12:40 2006 @@ -18,7 +18,6 @@ function prepare() { - // // Set form properties // @@ -29,11 +28,10 @@ // // Set field properties // - $this->mFieldProperties['andor'] =& new XCube_FieldProperty($this); $this->mFieldProperties['andor']->setDependsByArray(array('mask')); $this->mFieldProperties['andor']->addMessage('required', _MD_BASE_ERROR_MASK, _MD_BASE_LANG_ANDOR); - $this->mFieldProperties['andor']->addVar('mask', '/(AND|OR|exact)/'); + $this->mFieldProperties['andor']->addVar('mask', '/^(AND|OR|exact)$/i'); } function fetch() @@ -81,7 +79,7 @@ $params['queries'] = $this->mQueries; $params['andor'] = $this->get('andor'); - $params['maxhit'] = 5; + $params['maxhit'] = LEGACY_SEARCH_RESULT_MAXHIT; } } Index: xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php diff -u xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php:1.1.2.2 xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php:1.1.2.3 --- xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php:1.1.2.2 Sun May 28 14:03:36 2006 +++ xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php Fri Sep 1 12:12:40 2006 @@ -7,9 +7,9 @@ require_once XOOPS_MODULE_PATH . "/base/forms/SearchShowallForm.class.php"; -class Legacy_SearchShowallbyuserForm extends Legacy_SearchShowallForm +class Legacy_SearchShowallbyuserForm extends XCube_ActionForm { - function prepare($keywordMin) + function prepare() { parent::prepare(); @@ -17,12 +17,25 @@ // Set form properties // $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); + $this->mFormProperties['mid'] =& new XCube_IntProperty('mid'); + $this->mFormProperties['start'] =& new XCube_IntProperty('start'); + + // + // Set field properties + // + $this->mFieldProperties['uid'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['uid']->setDependsByArray(array('required')); + $this->mFieldProperties['uid']->addMessage('required', _MD_BASE_ERROR_REQUIRED, _MD_BASE_LANG_UID); + + $this->mFieldProperties['mid'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['mid']->setDependsByArray(array('required')); + $this->mFieldProperties['mid']->addMessage('required', _MD_BASE_ERROR_REQUIRED, _MD_BASE_LANG_MID); } function update(&$params) { - parent::update($params); $params['uid'] = $this->get('uid'); + $params['start'] = $this->get('start'); } } Index: xoops2jp/html/modules/base/forms/SearchShowallForm.class.php diff -u xoops2jp/html/modules/base/forms/SearchShowallForm.class.php:1.1.2.2 xoops2jp/html/modules/base/forms/SearchShowallForm.class.php:1.1.2.3 --- xoops2jp/html/modules/base/forms/SearchShowallForm.class.php:1.1.2.2 Thu Jul 27 18:34:36 2006 +++ xoops2jp/html/modules/base/forms/SearchShowallForm.class.php Fri Sep 1 12:12:40 2006 @@ -15,7 +15,6 @@ // Set form properties // $this->mFormProperties['mid'] =& new XCube_IntProperty('mid'); - $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); $this->mFormProperties['andor'] =& new XCube_StringProperty('andor'); $this->mFormProperties['query'] =& new XCube_StringProperty('query'); $this->mFormProperties['start'] =& new XCube_IntProperty('start'); @@ -23,20 +22,20 @@ // // Set field properties // - $this->mFieldProperties['andor'] =& new XCube_FieldProperty($this); $this->mFieldProperties['andor']->setDependsByArray(array('mask')); $this->mFieldProperties['andor']->addMessage('required', _MD_BASE_ERROR_MASK, _MD_BASE_LANG_ANDOR); - $this->mFieldProperties['andor']->addVar('mask', '/(AND|OR)/'); + $this->mFieldProperties['andor']->addVar('mask', '/^(AND|OR|exact)$/i'); + + $this->set('start', 0); } function update(&$params) { - $params['mids'][] = $this->get('mid'); $params['queries'] = $this->mQueries; $params['andor'] = $this->get('andor'); - $params['maxhit'] = 20; - $params['offset'] = $this->get('start') ? $this->get('start') : 0; + $params['maxhit'] = LEGACY_SEARCH_SHOWALL_MAXHIT; + $params['start'] = $this->get('start'); } }