Created
April 22, 2010 12:10
-
-
Save balibali/375140 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: webapp/lib/db/member.php | |
=================================================================== | |
--- webapp/lib/db/member.php (リビジョン 20393) | |
+++ webapp/lib/db/member.php (作業コピー) | |
@@ -293,16 +293,13 @@ | |
$order = " ORDER BY c_member_id DESC"; | |
$sql = "SELECT c_member_id" . $from . $where . $order; | |
- // 検索設定を公開にしていないメンバーを除外 | |
$result_ids = db_get_col($sql, $params); | |
- foreach ($result_ids as $key => $result_id) { | |
- $c_member_config = db_member_c_member_config4c_member_id($result_id); | |
- if ($c_member_config['IS_SEARCH_RESULT'] === '0') { | |
- unset($result_ids[$key]); | |
- } | |
- } | |
- $result_ids = array_merge($result_ids); | |
+ // 検索設定を公開にしていないメンバーを除外 | |
+ $sql = "SELECT c_member_id FROM c_member_config WHERE name = 'IS_SEARCH_RESULT' AND value = '0'"; | |
+ $ids = db_get_col($sql); | |
+ $result_ids = array_diff($result_ids, $ids); | |
+ | |
foreach ($profiles as $key => $value) { | |
$sql = "SELECT c_member_id FROM c_member_profile"; | |
$sql .= " WHERE c_profile_id = ? AND public_flag = 'public'"; | |
@@ -318,12 +315,13 @@ | |
$sql .= " AND c_profile_option_id = ?"; | |
$params[] = intval($value['c_profile_option_id']); | |
} | |
- $sql .= " ORDER BY c_member_id DESC"; | |
$ids = db_get_col($sql, $params); | |
- $result_ids = array_values(array_intersect($result_ids, $ids)); | |
+ $result_ids = array_intersect($result_ids, $ids); | |
} | |
+ $result_ids = array_values($result_ids); | |
+ | |
$start = ($page - 1) * $page_size; | |
$list = array(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment