Minahito
minah****@users*****
2006年 10月 12日 (木) 23:45:32 JST
Index: xoops2jp/html/modules/user/admin/forms/RanksFilterForm.class.php diff -u xoops2jp/html/modules/user/admin/forms/RanksFilterForm.class.php:1.1.2.5 xoops2jp/html/modules/user/admin/forms/RanksFilterForm.class.php:1.1.2.5.2.1 --- xoops2jp/html/modules/user/admin/forms/RanksFilterForm.class.php:1.1.2.5 Thu Jul 13 19:51:28 2006 +++ xoops2jp/html/modules/user/admin/forms/RanksFilterForm.class.php Thu Oct 12 23:45:32 2006 @@ -1,7 +1,7 @@ <?php /** * @package legacyRender - * @version $Id: RanksFilterForm.class.php,v 1.1.2.5 2006/07/13 10:51:28 minahito Exp $ + * @version $Id: RanksFilterForm.class.php,v 1.1.2.5.2.1 2006/10/12 14:45:32 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -26,17 +26,18 @@ RANKS_SORT_KEY_RANK_MAX => 'rank_max', RANKS_SORT_KEY_RANK_SPECIAL => 'rank_special' ); + + function getDefaultSortKey() + { + return RANKS_SORT_KEY_DEFAULT; + } function fetch() { - $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : RANKS_SORT_KEY_DEFAULT; - - if (!isset($this->mSortKeys[abs($this->mSort)])) { - $this->mSort = RANKS_SORT_KEY_DEFAULT; - } + parent::fetch(); if (isset($_REQUEST['rank_special'])) { - $this->_mNavi->addExtra('rank_special', xoops_getrequest('rank_special')); + $this->mNavi->addExtra('rank_special', xoops_getrequest('rank_special')); $this->_mCriteria->add(new Criteria('rank_special', xoops_getrequest('rank_special'))); } Index: xoops2jp/html/modules/user/admin/forms/AvatarFilterForm.class.php diff -u xoops2jp/html/modules/user/admin/forms/AvatarFilterForm.class.php:1.1.2.4 xoops2jp/html/modules/user/admin/forms/AvatarFilterForm.class.php:1.1.2.4.2.1 --- xoops2jp/html/modules/user/admin/forms/AvatarFilterForm.class.php:1.1.2.4 Fri Aug 4 13:39:31 2006 +++ xoops2jp/html/modules/user/admin/forms/AvatarFilterForm.class.php Thu Oct 12 23:45:32 2006 @@ -1,7 +1,7 @@ <?php /** * @package user - * @version $Id: AvatarFilterForm.class.php,v 1.1.2.4 2006/08/04 04:39:31 minahito Exp $ + * @version $Id: AvatarFilterForm.class.php,v 1.1.2.4.2.1 2006/10/12 14:45:32 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -32,22 +32,23 @@ AVATAR_SORT_KEY_AVATAR_WEIGHT => 'avatar_weight', AVATAR_SORT_KEY_AVATAR_TYPE => 'avatar_type' ); + + function getDefaultSortKey() + { + return AVATAR_SORT_KEY_DEFAULT; + } function fetch() { - $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0; - - if (!isset($this->mSortKeys[abs($this->mSort)])) { - $this->mSort = AVATAR_SORT_KEY_DEFAULT; - } + parent::fetch(); if (isset($_REQUEST['avatar_display'])) { - $this->_mNavi->addExtra('avatar_display', xoops_getrequest('avatar_display')); + $this->mNavi->addExtra('avatar_display', xoops_getrequest('avatar_display')); $this->_mCriteria->add(new Criteria('avatar_display', array(XOBJ_DTYPE_BOOL, xoops_getrequest('avatar_display')))); } if (isset($_REQUEST['avatar_type'])) { - $this->_mNavi->addExtra('avatar_type', xoops_getrequest('avatar_type')); + $this->mNavi->addExtra('avatar_type', xoops_getrequest('avatar_type')); $this->_mCriteria->add(new Criteria('avatar_type', array(XOBJ_DTYPE_STRING, xoops_getrequest('avatar_type')))); } Index: xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php diff -u 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.5.2.1 --- xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php:1.1.2.5 Thu Jul 13 19:52:22 2006 +++ xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php Thu Oct 12 23:45:32 2006 @@ -1,7 +1,7 @@ <?php /** * @package user - * @version $Id: UserFilterForm.class.php,v 1.1.2.5 2006/07/13 10:52:22 minahito Exp $ + * @version $Id: UserFilterForm.class.php,v 1.1.2.5.2.1 2006/10/12 14:45:32 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -83,46 +83,47 @@ USER_SORT_KEY_USER_MAILOK => 'user_mailok' ); - function fetch() + function getDefaultSortKey() { - $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : USER_SORT_KEY_DEFAULT; + return USER_SORT_KEY_DEFAULT; + } - if (!isset($this->mSortKeys[abs($this->mSort)])) { - $this->mSort = USER_SORT_KEY_DEFAULT; - } + function fetch() + { + parent::fetch(); if (isset($_REQUEST['uid'])) { - $this->_mNavi->addExtra('uid', xoops_getrequest('uid')); + $this->mNavi->addExtra('uid', xoops_getrequest('uid')); $this->_mCriteria->add(new Criteria('uid', xoops_getrequest('uid'))); } if (isset($_REQUEST['email'])) { - $this->_mNavi->addExtra('email', xoops_getrequest('email')); + $this->mNavi->addExtra('email', xoops_getrequest('email')); $this->_mCriteria->add(new Criteria('email', xoops_getrequest('email'))); } if (isset($_REQUEST['attachsig'])) { - $this->_mNavi->addExtra('attachsig', xoops_getrequest('attachsig')); + $this->mNavi->addExtra('attachsig', xoops_getrequest('attachsig')); $this->_mCriteria->add(new Criteria('attachsig', xoops_getrequest('attachsig'))); } if (isset($_REQUEST['rank'])) { - $this->_mNavi->addExtra('rank', xoops_getrequest('rank')); + $this->mNavi->addExtra('rank', xoops_getrequest('rank')); $this->_mCriteria->add(new Criteria('rank', xoops_getrequest('rank'))); } if (isset($_REQUEST['level'])) { - $this->_mNavi->addExtra('level', xoops_getrequest('level')); + $this->mNavi->addExtra('level', xoops_getrequest('level')); $this->_mCriteria->add(new Criteria('level', xoops_getrequest('level'))); } if (isset($_REQUEST['timezone_offset'])) { - $this->_mNavi->addExtra('timezone_offset', xoops_getrequest('timezone_offset')); + $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->_mNavi->addExtra('user_mailok', xoops_getrequest('user_mailok')); + $this->mNavi->addExtra('user_mailok', xoops_getrequest('user_mailok')); $this->_mCriteria->add(new Criteria('user_mailok', xoops_getrequest('user_mailok'))); } Index: xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php diff -u xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php:1.1.2.4 xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php:1.1.2.4.2.1 --- xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php:1.1.2.4 Thu Jul 13 19:50:06 2006 +++ xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php Thu Oct 12 23:45:32 2006 @@ -1,7 +1,7 @@ <?php /** * @package user - * @version $Id: GroupFilterForm.class.php,v 1.1.2.4 2006/07/13 10:50:06 minahito Exp $ + * @version $Id: GroupFilterForm.class.php,v 1.1.2.4.2.1 2006/10/12 14:45:32 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -26,26 +26,27 @@ GROUP_SORT_KEY_GROUP_TYPE => 'group_type' ); - function fetch() + function getDefaultSortKey() { - $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : GROUP_SORT_KEY_DEFAULT; + return GROUP_SORT_KEY_DEFAULT; + } - if (!isset($this->mSortKeys[abs($this->mSort)])) { - $this->mSort = GROUP_SORT_KEY_DEFAULT; - } + function fetch() + { + parent::fetch(); if (isset($_REQUEST['groupid'])) { - $this->_mNavi->addExtra('groupid', xoops_getrequest('groupid')); + $this->mNavi->addExtra('groupid', xoops_getrequest('groupid')); $this->_mCriteria->add(new Criteria('groupid', xoops_getrequest('groupid'))); } if (isset($_REQUEST['name'])) { - $this->_mNavi->addExtra('name', xoops_getrequest('name')); + $this->mNavi->addExtra('name', xoops_getrequest('name')); $this->_mCriteria->add(new Criteria('name', xoops_getrequest('name'))); } if (isset($_REQUEST['group_type'])) { - $this->_mNavi->addExtra('group_type', xoops_getrequest('group_type')); + $this->mNavi->addExtra('group_type', xoops_getrequest('group_type')); $this->_mCriteria->add(new Criteria('group_type', xoops_getrequest('group_type'))); } Index: xoops2jp/html/modules/user/admin/forms/UserSearchFilterForm.class.php diff -u xoops2jp/html/modules/user/admin/forms/UserSearchFilterForm.class.php:1.1.2.5 xoops2jp/html/modules/user/admin/forms/UserSearchFilterForm.class.php:1.1.2.5.2.1 --- xoops2jp/html/modules/user/admin/forms/UserSearchFilterForm.class.php:1.1.2.5 Mon Sep 25 18:40:16 2006 +++ xoops2jp/html/modules/user/admin/forms/UserSearchFilterForm.class.php Thu Oct 12 23:45:32 2006 @@ -1,7 +1,7 @@ <?php /** * @package user - * @version $Id: UserSearchFilterForm.class.php,v 1.1.2.5 2006/09/25 09:40:16 minahito Exp $ + * @version $Id: UserSearchFilterForm.class.php,v 1.1.2.5.2.1 2006/10/12 14:45:32 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -83,13 +83,14 @@ var $_mMatchFields = array ("uname", "name", "email", "user_icq", "user_aim", "user_yim", "user_msnm", "url", "user_from", "user_occ", "user_intrest"); + function getDefaultSortKey() + { + return USER_SORT_KEY_DEFAULT; + } + function fetch() { - $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : USER_SORT_KEY_DEFAULT; - - if (!isset($this->mSortKeys[abs($this->mSort)])) { - $this->mSort = USER_SORT_KEY_DEFAULT; - } + parent::fetch(); $form =& new User_UserSearchForm(); $form->prepare(); @@ -103,12 +104,12 @@ foreach ($this->_mMatchFields as $field) { if (strlen($form->get($field)) > 0) { - $this->_mNavi->addExtra($field, $form->get($field)); + $this->mNavi->addExtra($field, $form->get($field)); $this->_mCriteria->add(new Criteria('u.' . $field, '%' . $form->get($field) . '%', 'LIKE')); } } - $this->_mNavi->addExtra('mail_condition', $form->get('mail_condition')); + $this->mNavi->addExtra('mail_condition', $form->get('mail_condition')); switch ($form->get('mail_condition')) { case 1: $this->_mCriteria->add(new Criteria('u.user_mailok', 1)); @@ -119,7 +120,7 @@ break; } - $this->_mNavi->addExtra('user_level', $form->get('user_level')); + $this->mNavi->addExtra('user_level', $form->get('user_level')); switch ($form->get('user_level')) { case 1: $this->_mCriteria->add(new Criteria('u.level', 0, '>')); @@ -131,35 +132,35 @@ } if (strlen($form->get('over_posts')) > 0) { - $this->_mNavi->addExtra('over_posts', $form->get('over_posts')); + $this->mNavi->addExtra('over_posts', $form->get('over_posts')); $this->_mCriteria->add(new Criteria('u.posts', $form->get('over_posts'), '>=')); } if (strlen($form->get('under_posts')) > 0) { - $this->_mNavi->addExtra('under_posts', $form->get('under_posts')); + $this->mNavi->addExtra('under_posts', $form->get('under_posts')); $this->_mCriteria->add(new Criteria('u.posts', $form->get('under_posts'), '<=')); } if (strlen($form->get('lastlog_more')) > 0) { - $this->_mNavi->addExtra('lastlog_more', $form->get('lastlog_more')); + $this->mNavi->addExtra('lastlog_more', $form->get('lastlog_more')); $time = time() - $form->get('lastlog_more') * 86400; $this->_mCriteria->add(new Criteria('u.last_login', $time, '<=')); } if (strlen($form->get('lastlog_less')) > 0) { - $this->_mNavi->addExtra('lastlog_less', $form->get('lastlog_less')); + $this->mNavi->addExtra('lastlog_less', $form->get('lastlog_less')); $time = time() - $form->get('lastlog_more') * 86400; $this->_mCriteria->add(new Criteria('u.last_login', $time, '>=')); } if (strlen($form->get('regdate_more')) > 0) { - $this->_mNavi->addExtra('regdate_more', $form->get('regdate_more')); + $this->mNavi->addExtra('regdate_more', $form->get('regdate_more')); $time = time() - $form->get('regdate_more') * 86400; $this->_mCriteria->add(new Criteria('u.user_regdate', $time, '<=')); } if (strlen($form->get('regdate_less')) > 0) { - $this->_mNavi->addExtra('regdate_less', $form->get('regdate_less')); + $this->mNavi->addExtra('regdate_less', $form->get('regdate_less')); $time = time() - $form->get('regdate_less') * 86400; $this->_mCriteria->add(new Criteria('u.user_regdate', $time, '>=')); } @@ -170,7 +171,7 @@ foreach($groups as $gid) { $g_criteria->add(new Criteria('g.groupid', $gid)); } - $this->_mNavi->addExtra('groups[' . $gid . ']', $gid); + $this->mNavi->addExtra('groups[' . $gid . ']', $gid); $this->_mCriteria->add($g_criteria); } Index: xoops2jp/html/modules/user/admin/forms/MailjobFilterForm.class.php diff -u xoops2jp/html/modules/user/admin/forms/MailjobFilterForm.class.php:1.1.2.4 xoops2jp/html/modules/user/admin/forms/MailjobFilterForm.class.php:1.1.2.4.2.1 --- xoops2jp/html/modules/user/admin/forms/MailjobFilterForm.class.php:1.1.2.4 Thu Jul 13 19:50:53 2006 +++ xoops2jp/html/modules/user/admin/forms/MailjobFilterForm.class.php Thu Oct 12 23:45:32 2006 @@ -28,30 +28,31 @@ MAILJOB_SORT_KEY_IS_MAIL => 'is_mail', MAILJOB_SORT_KEY_CREATE_UNIXTIME => 'create_unixtime' ); + + function getDefaultSortKey() + { + return MAILJOB_SORT_KEY_DEFAULT; + } function fetch() { - $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : MAILJOB_SORT_KEY_DEFAULT; - - if (!isset($this->mSortKeys[abs($this->mSort)])) { - $this->mSort = MAILJOB_SORT_KEY_DEFAULT; - } + parent::fetch(); if (isset($_REQUEST['title'])) { // // TODO like // - $this->_mNavi->addExtra('title', xoops_getrequest('title')); + $this->mNavi->addExtra('title', xoops_getrequest('title')); $this->_mCriteria->add(new Criteria('title', array(XOBJ_DTYPE_STRING, xoops_getrequest('title')))); } if (isset($_REQUEST['is_pm'])) { - $this->_mNavi->addExtra('is_pm', xoops_getrequest('is_pm')); + $this->mNavi->addExtra('is_pm', xoops_getrequest('is_pm')); $this->_mCriteria->add(new Criteria('is_pm', xoops_getrequest('is_pm'))); } if (isset($_REQUEST['is_mail'])) { - $this->_mNavi->addExtra('is_mail', xoops_getrequest('is_mail')); + $this->mNavi->addExtra('is_mail', xoops_getrequest('is_mail')); $this->_mCriteria->add(new Criteria('is_mail', xoops_getrequest('is_mail'))); }