Minahito
minah****@users*****
2006年 2月 21日 (火) 20:48:35 JST
Index: xoops2jp/html/modules/base/admin/forms/CommentFilterForm.class.php diff -u xoops2jp/html/modules/base/admin/forms/CommentFilterForm.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/forms/CommentFilterForm.class.php:1.1.2.2 --- xoops2jp/html/modules/base/admin/forms/CommentFilterForm.class.php:1.1.2.1 Thu Jan 26 01:17:45 2006 +++ xoops2jp/html/modules/base/admin/forms/CommentFilterForm.class.php Tue Feb 21 20:48:35 2006 @@ -61,10 +61,6 @@ $this->mSort = COMMENT_SORT_KEY_DEFAULT; } - if (isset($_REQUEST['com_id'])) { - $this->_mCriteria->add(new Criteria('com_id', array(XOBJ_DTYPE_INT, xoops_getrequest('com_id')))); - } - if (isset($_REQUEST['com_pid'])) { $this->_mCriteria->add(new Criteria('com_pid', array(XOBJ_DTYPE_INT, xoops_getrequest('com_pid')))); } @@ -76,6 +72,13 @@ if (isset($_REQUEST['com_modid'])) { $this->_mCriteria->add(new Criteria('com_modid', array(XOBJ_DTYPE_INT, xoops_getrequest('com_modid')))); } + elseif (isset($_REQUEST['dirname'])) { + $handler =& xoops_gethandler('module'); + $module =& $handler->getByDirname(xoops_getrequest('dirname')); + if (is_object($module)) { + $this->_mCriteria->add(new Criteria('com_modid', array(XOBJ_DTYPE_INT, $module->get('mid')))); + } + } if (isset($_REQUEST['com_itemid'])) { $this->_mCriteria->add(new Criteria('com_itemid', array(XOBJ_DTYPE_INT, xoops_getrequest('com_itemid')))); @@ -85,14 +88,6 @@ $this->_mCriteria->add(new Criteria('com_icon', array(XOBJ_DTYPE_STRING, xoops_getrequest('com_icon')))); } - if (isset($_REQUEST['com_created'])) { - $this->_mCriteria->add(new Criteria('com_created', array(XOBJ_DTYPE_INT, xoops_getrequest('com_created')))); - } - - if (isset($_REQUEST['com_modified'])) { - $this->_mCriteria->add(new Criteria('com_modified', array(XOBJ_DTYPE_INT, xoops_getrequest('com_modified')))); - } - if (isset($_REQUEST['com_uid'])) { $this->_mCriteria->add(new Criteria('com_uid', array(XOBJ_DTYPE_INT, xoops_getrequest('com_uid')))); } @@ -102,40 +97,12 @@ } if (isset($_REQUEST['com_title'])) { - $this->_mCriteria->add(new Criteria('com_title', array(XOBJ_DTYPE_STRING, xoops_getrequest('com_title')))); - } - - if (isset($_REQUEST['com_sig'])) { - $this->_mCriteria->add(new Criteria('com_sig', array(XOBJ_DTYPE_BOOL, xoops_getrequest('com_sig')))); + $this->_mCriteria->add(new Criteria('com_title', array(XOBJ_DTYPE_STRING, "%" . xoops_getrequest('com_title') . "%", 'LIKE'))); } if (isset($_REQUEST['com_status'])) { $this->_mCriteria->add(new Criteria('com_status', array(XOBJ_DTYPE_BOOL, xoops_getrequest('com_status')))); } - - if (isset($_REQUEST['com_exparams'])) { - $this->_mCriteria->add(new Criteria('com_exparams', array(XOBJ_DTYPE_STRING, xoops_getrequest('com_exparams')))); - } - - if (isset($_REQUEST['dohtml'])) { - $this->_mCriteria->add(new Criteria('dohtml', array(XOBJ_DTYPE_BOOL, xoops_getrequest('dohtml')))); - } - - if (isset($_REQUEST['dosmiley'])) { - $this->_mCriteria->add(new Criteria('dosmiley', array(XOBJ_DTYPE_BOOL, xoops_getrequest('dosmiley')))); - } - - if (isset($_REQUEST['doxcode'])) { - $this->_mCriteria->add(new Criteria('doxcode', array(XOBJ_DTYPE_BOOL, xoops_getrequest('doxcode')))); - } - - if (isset($_REQUEST['doimage'])) { - $this->_mCriteria->add(new Criteria('doimage', array(XOBJ_DTYPE_BOOL, xoops_getrequest('doimage')))); - } - - if (isset($_REQUEST['dobr'])) { - $this->_mCriteria->add(new Criteria('dobr', array(XOBJ_DTYPE_BOOL, xoops_getrequest('dobr')))); - } } }