[xoops-cvslog 2890] CVS update: xoops2jp/html/modules/legacyRender/admin/forms

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 4月 25日 (火) 14:24:16 JST


Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php
diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php:1.1.2.2
--- xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php:1.1.2.1	Mon Apr 24 16:30:22 2006
+++ xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php	Tue Apr 25 14:24:16 2006
@@ -4,7 +4,6 @@
 
 require_once XOOPS_MODULE_PATH . "/legacyRender/class/AbstractFilterForm.class.php";
 
-define('BANNERCLIENT_SORT_KEY_DEFAULT', 0);
 define('BANNERCLIENT_SORT_KEY_CID', 1);
 define('BANNERCLIENT_SORT_KEY_NAME', 2);
 define('BANNERCLIENT_SORT_KEY_CONTACT', 3);
@@ -14,11 +13,12 @@
 define('BANNERCLIENT_SORT_KEY_EXTRAINFO', 7);
 define('BANNERCLIENT_SORT_KEY_MAXVALUE', 7);
 
+define('BANNERCLIENT_SORT_KEY_DEFAULT', BANNERCLIENT_SORT_KEY_CID);
+
 class LegacyRender_BannerclientFilterForm extends LegacyRender_AbstractFilterForm
 {
 	var $mSort = 0;
-	var $mSortKeys = array(
-		BANNERCLIENT_SORT_KEY_DEFAULT => 'cid',
+	var $_mSortKeys = array(
 		BANNERCLIENT_SORT_KEY_CID => 'cid',
 		BANNERCLIENT_SORT_KEY_NAME => 'name',
 		BANNERCLIENT_SORT_KEY_CONTACT => 'contact',
@@ -31,41 +31,25 @@
 
 	function fetch()
 	{
-		$this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0;
+		$this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : BANNERCLIENT_SORT_KEY_DEFAULT;
 	
 		if ($this->mSort > BANNERCLIENT_SORT_KEY_MAXVALUE) {
 			$this->mSort = BANNERCLIENT_SORT_KEY_DEFAULT;
 		}
 	
-		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['name'])) {
 			$this->_mNavi->addExtra('name', xoops_getrequest('name'));
+			// TODO Changet to 'LIKE' (?)
 			$this->_mCriteria->add(new Criteria('name', array(XOBJ_DTYPE_STRING, xoops_getrequest('name'))));
 		}
 	
 		if (isset($_REQUEST['contact'])) {
 			$this->_mNavi->addExtra('contact', xoops_getrequest('contact'));
+			// TODO Changet to 'LIKE' (?)
 			$this->_mCriteria->add(new Criteria('contact', array(XOBJ_DTYPE_STRING, xoops_getrequest('contact'))));
 		}
-	
-		if (isset($_REQUEST['email'])) {
-			$this->_mNavi->addExtra('email', xoops_getrequest('email'));
-			$this->_mCriteria->add(new Criteria('email', array(XOBJ_DTYPE_STRING, xoops_getrequest('email'))));
-		}
-	
-		if (isset($_REQUEST['login'])) {
-			$this->_mNavi->addExtra('login', xoops_getrequest('login'));
-			$this->_mCriteria->add(new Criteria('login', array(XOBJ_DTYPE_STRING, xoops_getrequest('login'))));
-		}
-	
-		if (isset($_REQUEST['passwd'])) {
-			$this->_mNavi->addExtra('passwd', xoops_getrequest('passwd'));
-			$this->_mCriteria->add(new Criteria('passwd', array(XOBJ_DTYPE_STRING, xoops_getrequest('passwd'))));
-		}
+		
+		$this->_mCriteria->addSort($this->getSort(), $this->getOrder());
 	}
 }
 
Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishFilterForm.class.php
diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishFilterForm.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishFilterForm.class.php:1.1.2.2
--- xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishFilterForm.class.php:1.1.2.1	Mon Apr 24 16:30:22 2006
+++ xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishFilterForm.class.php	Tue Apr 25 14:24:16 2006
@@ -4,7 +4,6 @@
 
 require_once XOOPS_MODULE_PATH . "/legacyRender/class/AbstractFilterForm.class.php";
 
-define('BANNERFINISH_SORT_KEY_DEFAULT', 0);
 define('BANNERFINISH_SORT_KEY_BID', 1);
 define('BANNERFINISH_SORT_KEY_CID', 2);
 define('BANNERFINISH_SORT_KEY_IMPRESSIONS', 3);
@@ -13,11 +12,12 @@
 define('BANNERFINISH_SORT_KEY_DATEEND', 6);
 define('BANNERFINISH_SORT_KEY_MAXVALUE', 6);
 
+define('BANNERFINISH_SORT_KEY_DEFAULT', BANNERFINISH_SORT_KEY_BID);
+
 class LegacyRender_BannerfinishFilterForm extends LegacyRender_AbstractFilterForm
 {
 	var $mSort = 0;
-	var $mSortKeys = array(
-		BANNERFINISH_SORT_KEY_DEFAULT => 'bid',
+	var $_mSortKeys = array(
 		BANNERFINISH_SORT_KEY_BID => 'bid',
 		BANNERFINISH_SORT_KEY_CID => 'cid',
 		BANNERFINISH_SORT_KEY_IMPRESSIONS => 'impressions',
@@ -29,41 +29,18 @@
 
 	function fetch()
 	{
-		$this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0;
+		$this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : BANNERFINISH_SORT_KEY_DEFAULT;
 	
 		if ($this->mSort > BANNERFINISH_SORT_KEY_MAXVALUE) {
 			$this->mSort = BANNERFINISH_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['impressions'])) {
-			$this->_mNavi->addExtra('impressions', xoops_getrequest('impressions'));
-			$this->_mCriteria->add(new Criteria('impressions', array(XOBJ_DTYPE_INT, xoops_getrequest('impressions'))));
-		}
-	
-		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['datestart'])) {
-			$this->_mNavi->addExtra('datestart', xoops_getrequest('datestart'));
-			$this->_mCriteria->add(new Criteria('datestart', array(XOBJ_DTYPE_INT, xoops_getrequest('datestart'))));
-		}
-	
-		if (isset($_REQUEST['dateend'])) {
-			$this->_mNavi->addExtra('dateend', xoops_getrequest('dateend'));
-			$this->_mCriteria->add(new Criteria('dateend', array(XOBJ_DTYPE_INT, xoops_getrequest('dateend'))));
-		}
+		
+		$this->_mCriteria->addSort($this->getSort(), $this->getOrder());
 	}
 }
 
Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php
diff -u 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.3
--- xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php:1.1.2.2	Mon Apr 24 19:40:06 2006
+++ xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php	Tue Apr 25 14:24:16 2006
@@ -21,7 +21,7 @@
 class LegacyRender_BannerFilterForm extends LegacyRender_AbstractFilterForm
 {
 	var $mSort = 0;
-	var $mSortKeys = array(
+	var $_mSortKeys = array(
 		BANNER_SORT_KEY_BID => 'bid',
 		BANNER_SORT_KEY_CID => 'cid',
 		BANNER_SORT_KEY_IMPTOTAL => 'imptotal',
@@ -52,6 +52,8 @@
 			$this->_mNavi->addExtra('htmlbanner', xoops_getrequest('htmlbanner'));
 			$this->_mCriteria->add(new Criteria('htmlbanner', array(XOBJ_DTYPE_BOOL, xoops_getrequest('htmlbanner'))));
 		}
+		
+		$this->_mCriteria->addSort($this->getSort(), $this->getOrder());
 	}
 }
 


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index