[xoops-cvslog 3590] CVS update: xoops2jp/html/modules/user/admin/forms

Back to archive index

Minahito minah****@users*****
2006年 7月 13日 (木) 19:52:22 JST


Index: xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php
diff -u xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php:1.1.2.4 xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php:1.1.2.5
--- xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php:1.1.2.4	Sun May 28 14:42:40 2006
+++ xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php	Thu Jul 13 19:52:22 2006
@@ -1,4 +1,8 @@
 <?php
+/**
+ * @package user
+ * @version $Id: UserFilterForm.class.php,v 1.1.2.5 2006/07/13 10:52:22 minahito Exp $
+ */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
 
@@ -39,9 +43,12 @@
 
 define('USER_SORT_KEY_DEFAULT', USER_SORT_KEY_UID);
 
+/**
+ * [Notice]
+ * We should have our policy about filtering items.
+ */
 class User_UserFilterForm extends User_AbstractFilterForm
 {
-	var $mSort = 0;
 	var $mSortKeys = array(
 		USER_SORT_KEY_UID => 'uid',
 		USER_SORT_KEY_NAME => 'name',
@@ -75,130 +82,48 @@
 		USER_SORT_KEY_USER_INTREST => 'user_intrest',
 		USER_SORT_KEY_USER_MAILOK => 'user_mailok'
 	);
-	var $_mCriteria = null;
 
 	function fetch()
 	{
 		$this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : USER_SORT_KEY_DEFAULT;
 	
-		if ($this->mSort > USER_SORT_KEY_MAXVALUE) {
+		if (!isset($this->mSortKeys[abs($this->mSort)])) {
 			$this->mSort = USER_SORT_KEY_DEFAULT;
 		}
 	
 		if (isset($_REQUEST['uid'])) {
-			$this->_mCriteria->add(new Criteria('uid', array(XOBJ_DTYPE_INT, xoops_getrequest('uid'))));
+			$this->_mNavi->addExtra('uid', xoops_getrequest('uid'));
+			$this->_mCriteria->add(new Criteria('uid', xoops_getrequest('uid')));
 		}
-	
-		if (isset($_REQUEST['name'])) {
-			$this->_mCriteria->add(new Criteria('name', array(XOBJ_DTYPE_STRING, xoops_getrequest('name'))));
-		}
-	
-		if (isset($_REQUEST['uname'])) {
-			$this->_mCriteria->add(new Criteria('uname', array(XOBJ_DTYPE_STRING, xoops_getrequest('uname'))));
-		}
-	
+
 		if (isset($_REQUEST['email'])) {
-			$this->_mCriteria->add(new Criteria('email', array(XOBJ_DTYPE_STRING, xoops_getrequest('email'))));
-		}
-	
-		if (isset($_REQUEST['url'])) {
-			$this->_mCriteria->add(new Criteria('url', array(XOBJ_DTYPE_STRING, xoops_getrequest('url'))));
-		}
-	
-		if (isset($_REQUEST['user_avatar'])) {
-			$this->_mCriteria->add(new Criteria('user_avatar', array(XOBJ_DTYPE_STRING, xoops_getrequest('user_avatar'))));
-		}
-	
-		if (isset($_REQUEST['user_regdate'])) {
-			$this->_mCriteria->add(new Criteria('user_regdate', array(XOBJ_DTYPE_INT, xoops_getrequest('user_regdate'))));
-		}
-	
-		if (isset($_REQUEST['user_icq'])) {
-			$this->_mCriteria->add(new Criteria('user_icq', array(XOBJ_DTYPE_STRING, xoops_getrequest('user_icq'))));
-		}
-	
-		if (isset($_REQUEST['user_from'])) {
-			$this->_mCriteria->add(new Criteria('user_from', array(XOBJ_DTYPE_STRING, xoops_getrequest('user_from'))));
-		}
-	
-		if (isset($_REQUEST['user_viewemail'])) {
-			$this->_mCriteria->add(new Criteria('user_viewemail', array(XOBJ_DTYPE_BOOL, xoops_getrequest('user_viewemail'))));
-		}
-	
-		if (isset($_REQUEST['actkey'])) {
-			$this->_mCriteria->add(new Criteria('actkey', array(XOBJ_DTYPE_STRING, xoops_getrequest('actkey'))));
-		}
-	
-		if (isset($_REQUEST['user_aim'])) {
-			$this->_mCriteria->add(new Criteria('user_aim', array(XOBJ_DTYPE_STRING, xoops_getrequest('user_aim'))));
-		}
-	
-		if (isset($_REQUEST['user_yim'])) {
-			$this->_mCriteria->add(new Criteria('user_yim', array(XOBJ_DTYPE_STRING, xoops_getrequest('user_yim'))));
-		}
-	
-		if (isset($_REQUEST['user_msnm'])) {
-			$this->_mCriteria->add(new Criteria('user_msnm', array(XOBJ_DTYPE_STRING, xoops_getrequest('user_msnm'))));
-		}
-	
-		if (isset($_REQUEST['pass'])) {
-			$this->_mCriteria->add(new Criteria('pass', array(XOBJ_DTYPE_STRING, xoops_getrequest('pass'))));
-		}
-	
-		if (isset($_REQUEST['posts'])) {
-			$this->_mCriteria->add(new Criteria('posts', array(XOBJ_DTYPE_INT, xoops_getrequest('posts'))));
+			$this->_mNavi->addExtra('email', xoops_getrequest('email'));
+			$this->_mCriteria->add(new Criteria('email', xoops_getrequest('email')));
 		}
 	
 		if (isset($_REQUEST['attachsig'])) {
-			$this->_mCriteria->add(new Criteria('attachsig', array(XOBJ_DTYPE_BOOL, xoops_getrequest('attachsig'))));
+			$this->_mNavi->addExtra('attachsig', xoops_getrequest('attachsig'));
+			$this->_mCriteria->add(new Criteria('attachsig', xoops_getrequest('attachsig')));
 		}
 	
 		if (isset($_REQUEST['rank'])) {
-			$this->_mCriteria->add(new Criteria('rank', array(XOBJ_DTYPE_INT, xoops_getrequest('rank'))));
+			$this->_mNavi->addExtra('rank', xoops_getrequest('rank'));
+			$this->_mCriteria->add(new Criteria('rank', xoops_getrequest('rank')));
 		}
 	
 		if (isset($_REQUEST['level'])) {
-			$this->_mCriteria->add(new Criteria('level', array(XOBJ_DTYPE_INT, xoops_getrequest('level'))));
-		}
-	
-		if (isset($_REQUEST['theme'])) {
-			$this->_mCriteria->add(new Criteria('theme', array(XOBJ_DTYPE_STRING, xoops_getrequest('theme'))));
+			$this->_mNavi->addExtra('level', xoops_getrequest('level'));
+			$this->_mCriteria->add(new Criteria('level', xoops_getrequest('level')));
 		}
 	
 		if (isset($_REQUEST['timezone_offset'])) {
-			$this->_mCriteria->add(new Criteria('timezone_offset', array(XOBJ_DTYPE_FLOAT, xoops_getrequest('timezone_offset'))));
-		}
-	
-		if (isset($_REQUEST['last_login'])) {
-			$this->_mCriteria->add(new Criteria('last_login', array(XOBJ_DTYPE_INT, xoops_getrequest('last_login'))));
-		}
-	
-		if (isset($_REQUEST['umode'])) {
-			$this->_mCriteria->add(new Criteria('umode', array(XOBJ_DTYPE_STRING, xoops_getrequest('umode'))));
-		}
-	
-		if (isset($_REQUEST['uorder'])) {
-			$this->_mCriteria->add(new Criteria('uorder', array(XOBJ_DTYPE_BOOL, xoops_getrequest('uorder'))));
-		}
-	
-		if (isset($_REQUEST['notify_method'])) {
-			$this->_mCriteria->add(new Criteria('notify_method', array(XOBJ_DTYPE_BOOL, xoops_getrequest('notify_method'))));
-		}
-	
-		if (isset($_REQUEST['notify_mode'])) {
-			$this->_mCriteria->add(new Criteria('notify_mode', array(XOBJ_DTYPE_BOOL, xoops_getrequest('notify_mode'))));
-		}
-	
-		if (isset($_REQUEST['user_occ'])) {
-			$this->_mCriteria->add(new Criteria('user_occ', array(XOBJ_DTYPE_STRING, xoops_getrequest('user_occ'))));
-		}
-	
-		if (isset($_REQUEST['user_intrest'])) {
-			$this->_mCriteria->add(new Criteria('user_intrest', array(XOBJ_DTYPE_STRING, xoops_getrequest('user_intrest'))));
+			$this->_mNavi->addExtra('timezone_offset', xoops_getrequest('timezone_offset'));
+			$this->_mCriteria->add(new Criteria('timezone_offset', xoops_getrequest('timezone_offset')));
 		}
 	
 		if (isset($_REQUEST['user_mailok'])) {
-			$this->_mCriteria->add(new Criteria('user_mailok', array(XOBJ_DTYPE_BOOL, xoops_getrequest('user_mailok'))));
+			$this->_mNavi->addExtra('user_mailok', xoops_getrequest('user_mailok'));
+			$this->_mCriteria->add(new Criteria('user_mailok', xoops_getrequest('user_mailok')));
 		}
 		
 		$this->_mCriteria->addSort($this->getSort(), $this->getOrder());


xoops-cvslog メーリングリストの案内
Back to archive index