Minahito
minah****@users*****
2006年 4月 24日 (月) 19:40:06 JST
Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php:1.1.2.1 Mon Apr 24 16:30:22 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php Mon Apr 24 19:40:06 2006 @@ -4,7 +4,6 @@ require_once XOOPS_MODULE_PATH . "/legacyRender/class/AbstractFilterForm.class.php"; -define('BANNER_SORT_KEY_DEFAULT', 0); define('BANNER_SORT_KEY_BID', 1); define('BANNER_SORT_KEY_CID', 2); define('BANNER_SORT_KEY_IMPTOTAL', 3); @@ -17,11 +16,12 @@ define('BANNER_SORT_KEY_HTMLCODE', 10); define('BANNER_SORT_KEY_MAXVALUE', 10); +define('BANNER_SORT_KEY_DEFAULT', BANNER_SORT_KEY_BID); + class LegacyRender_BannerFilterForm extends LegacyRender_AbstractFilterForm { var $mSort = 0; var $mSortKeys = array( - BANNER_SORT_KEY_DEFAULT => 'bid', BANNER_SORT_KEY_BID => 'bid', BANNER_SORT_KEY_CID => 'cid', BANNER_SORT_KEY_IMPTOTAL => 'imptotal', @@ -37,52 +37,17 @@ function fetch() { - $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0; + $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : BANNER_SORT_KEY_DEFAULT; if ($this->mSort > BANNER_SORT_KEY_MAXVALUE) { $this->mSort = BANNER_SORT_KEY_DEFAULT; } - if (isset($_REQUEST['bid'])) { - $this->_mNavi->addExtra('bid', xoops_getrequest('bid')); - $this->_mCriteria->add(new Criteria('bid', array(XOBJ_DTYPE_INT, xoops_getrequest('bid')))); - } - if (isset($_REQUEST['cid'])) { $this->_mNavi->addExtra('cid', xoops_getrequest('cid')); $this->_mCriteria->add(new Criteria('cid', array(XOBJ_DTYPE_INT, xoops_getrequest('cid')))); } - if (isset($_REQUEST['imptotal'])) { - $this->_mNavi->addExtra('imptotal', xoops_getrequest('imptotal')); - $this->_mCriteria->add(new Criteria('imptotal', array(XOBJ_DTYPE_INT, xoops_getrequest('imptotal')))); - } - - if (isset($_REQUEST['impmade'])) { - $this->_mNavi->addExtra('impmade', xoops_getrequest('impmade')); - $this->_mCriteria->add(new Criteria('impmade', array(XOBJ_DTYPE_INT, xoops_getrequest('impmade')))); - } - - if (isset($_REQUEST['clicks'])) { - $this->_mNavi->addExtra('clicks', xoops_getrequest('clicks')); - $this->_mCriteria->add(new Criteria('clicks', array(XOBJ_DTYPE_INT, xoops_getrequest('clicks')))); - } - - if (isset($_REQUEST['imageurl'])) { - $this->_mNavi->addExtra('imageurl', xoops_getrequest('imageurl')); - $this->_mCriteria->add(new Criteria('imageurl', array(XOBJ_DTYPE_STRING, xoops_getrequest('imageurl')))); - } - - if (isset($_REQUEST['clickurl'])) { - $this->_mNavi->addExtra('clickurl', xoops_getrequest('clickurl')); - $this->_mCriteria->add(new Criteria('clickurl', array(XOBJ_DTYPE_STRING, xoops_getrequest('clickurl')))); - } - - if (isset($_REQUEST['date'])) { - $this->_mNavi->addExtra('date', xoops_getrequest('date')); - $this->_mCriteria->add(new Criteria('date', array(XOBJ_DTYPE_INT, xoops_getrequest('date')))); - } - if (isset($_REQUEST['htmlbanner'])) { $this->_mNavi->addExtra('htmlbanner', xoops_getrequest('htmlbanner')); $this->_mCriteria->add(new Criteria('htmlbanner', array(XOBJ_DTYPE_BOOL, xoops_getrequest('htmlbanner'))));