Minahito
minah****@users*****
2006年 4月 15日 (土) 12:03:33 JST
Index: xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php diff -u xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.4 xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.5 --- xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.4 Tue Apr 11 15:12:45 2006 +++ xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php Sat Apr 15 12:03:33 2006 @@ -28,6 +28,9 @@ define('NEWBLOCKS_SORT_KEY_DEFAULT', NEWBLOCKS_SORT_KEY_MID); +// +// TODO This class should extend Legacy_BlockFilterForm +// class Legacy_BlockInstallFilterForm extends Legacy_AbstractFilterForm { var $mSort = 0; @@ -87,6 +90,21 @@ $this->_mCriteria->add(new Criteria('isactive', array(XOBJ_DTYPE_BOOL, 1))); $this->_mCriteria->addSort($this->getSort(), $this->getOrder()); + + // + // If the sort key is mid, set c_type to second sort key for list display. + // + if (abs($this->mSort) == NEWBLOCKS_SORT_KEY_MID) { + $this->_mCriteria->addSort('c_type', $this->getOrder()); + } + + if (abs($this->mSort) != NEWBLOCKS_SORT_KEY_SIDE) { + $this->_mCriteria->addSort('side', $this->getOrder()); + } + + if (abs($this->mSort) != NEWBLOCKS_SORT_KEY_WEIGHT) { + $this->_mCriteria->addSort('weight', $this->getOrder()); + } } }