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

Ignore:
Timestamp:
Aug 29, 2007, 2:59:51 PM (13 years ago)
Author:
ebihara
Message:

#177:日記コメントのソート順が新着順になっていたのを修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/lib/db/diary.php

    r3738 r3786  
    913913 * 日記へのコメントリストを取得
    914914 */
    915 function k_p_fh_diary_c_diary_comment_list4c_diary_id($c_diary_id, $page_size, $page)
    916 {
    917     $sql = 'SELECT * FROM c_diary_comment WHERE c_diary_id = ? ORDER BY r_datetime DESC';
     915function k_p_fh_diary_c_diary_comment_list4c_diary_id($c_diary_id, $page_size, $page, $desc = true)
     916{
     917    $sql = 'SELECT * FROM c_diary_comment WHERE c_diary_id = ? ORDER BY r_datetime ';
     918    if ($desc) {
     919        $sql .= 'DESC';
     920    } else {
     921        $sql .= 'ASC';
     922    }
    918923    $params = array(intval($c_diary_id));
    919924    $c_diary_comment_list = db_get_all_page($sql, $page, $page_size, $params);
Note: See TracChangeset for help on using the changeset viewer.