ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 13495


Ignore:
Timestamp:
May 6, 2010, 12:12:41 PM (13 years ago)
Author:
kiwa
Message:

#4431 メンバー検索の処理速度改善を取り込み

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/stable-2.14.x/webapp/lib/db/member.php

    r13293 r13495  
    294294    $sql = "SELECT c_member_id" . $from . $where . $order;
    295295
     296    $result_ids = db_get_col($sql, $params);
     297
    296298    // 検索設定を公開にしていないメンバーを除外
    297     $result_ids = db_get_col($sql, $params);
    298     foreach ($result_ids as $key => $result_id) {
    299         $c_member_config = db_member_c_member_config4c_member_id($result_id);
    300         if ($c_member_config['IS_SEARCH_RESULT'] === '0') {
    301             unset($result_ids[$key]);
    302         }
    303     }
    304     $result_ids = array_merge($result_ids);
     299    $sql = "SELECT c_member_id FROM c_member_config WHERE name = 'IS_SEARCH_RESULT' AND value = '0'";
     300    $ids = db_get_col($sql);
     301    $result_ids = array_diff($result_ids, $ids);
    305302
    306303    foreach ($profiles as $key => $value) {
     
    319316            $params[] = intval($value['c_profile_option_id']);
    320317        }
    321         $sql .= " ORDER BY c_member_id DESC";
    322318
    323319        $ids = db_get_col($sql, $params);
    324         $result_ids = array_values(array_intersect($result_ids, $ids));
    325     }
     320        $result_ids = array_intersect($result_ids, $ids);
     321    }
     322
     323    $result_ids = array_values($result_ids);
    326324
    327325    $start = ($page - 1) * $page_size;
Note: See TracChangeset for help on using the changeset viewer.