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

Changeset 9466


Ignore:
Timestamp:
Dec 4, 2008, 4:17:46 PM (12 years ago)
Author:
ogawa
Message:

#3184:pc_page_fh_comment_list内のSQLからdefaultを削除

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/stable-2.12.x/webapp/modules/pc/page/fh_comment_list.php

    r6775 r9466  
    5959    }
    6060
    61 
    62     //c_member_id から自分の日記についてるコメントID(複数)を取得
    63     //日記公開範囲を考慮
     61    // c_member_id から自分の日記についてるコメントID(複数)を取得
     62    // 日記公開範囲を考慮
    6463    function _p_fh_diary_c_diary_comment_id_list4c_member_id($c_member_id, $is_friend, $type)
    6564    {
     
    6867        }
    6968
    70         $sql = "SELECT cdc.c_diary_comment_id FROM c_diary as cd,c_diary_comment as cdc, c_member as cm" .
     69        $sql = "SELECT cdc.c_diary_comment_id FROM c_diary as cd,c_diary_comment as cdc" .
    7170            " WHERE cd.c_member_id = ?".
    72             " AND cd.c_diary_id = cdc.c_diary_id".
    73             " AND cd.c_member_id = cm.c_member_id";
     71            " AND cd.c_diary_id = cdc.c_diary_id";
    7472
    7573        if ($is_friend) {
    76             $sql .= ' AND ((cd.public_flag = \'public\') OR (cd.public_flag = \'default\' AND cm.public_flag_diary = \'public\') OR (cd.public_flag = \'friend\') OR (cd.public_flag = \'default\' AND cm.public_flag_diary = \'friend\'))';
     74            $sql .= " AND cd.public_flag <> 'private'";
    7775        } else {
    78             $sql .= ' AND ((cd.public_flag = \'public\') OR (cd.public_flag = \'default\' AND cm.public_flag_diary = \'public\'))';
     76            $sql .= " AND cd.public_flag = 'public'";
    7977        }
    8078
     
    8280        return db_get_col($sql, $params);
    8381    }
    84 
    85 
    8682}
    8783
Note: See TracChangeset for help on using the changeset viewer.