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

Changeset 7012


Ignore:
Timestamp:
May 7, 2008, 5:27:14 PM (14 years ago)
Author:
ebihara
Message:

#2149:MySQL4.0環境でポータルにコミュニティ最新書き込みが表示されなかったのを修正

Location:
OpenPNE/branches/stable-2.12.x/webapp/modules/portal
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/stable-2.12.x/webapp/modules/portal/lib/db_portal.php

    r6527 r7012  
    274274    $is_recurred = false;
    275275
    276     $select = "SELECT ct.*, c.name as commu_name, ctc.r_datetime as comment_datetime, c.image_filename as image_filename";
     276    $select = "SELECT ct.*, c.name as commu_name, c.image_filename as image_filename";
    277277    $from = " FROM c_commu_topic as ct"
    278           . " LEFT JOIN c_commu as c ON c.c_commu_id = ct.c_commu_id"
    279           . " LEFT JOIN c_commu_topic_comment as ctc ON (ctc.c_commu_topic_id = ct.c_commu_topic_id AND ctc.number = (select max(number) FROM c_commu_topic_comment where c_commu_topic_id = ct.c_commu_topic_id))";
     278          . " LEFT JOIN c_commu as c ON c.c_commu_id = ct.c_commu_id";
    280279    $where = " WHERE c.public_flag = 'public'";
    281     $order = " ORDER BY comment_datetime DESC";
     280    $order = " ORDER BY ct.u_datetime DESC";
    282281
    283282    $sql = $select . $from . $where . $order;
  • OpenPNE/branches/stable-2.12.x/webapp/modules/portal/templates/inc_portal_Contents_Layout.tpl

    r6410 r7012  
    1111                            <span><img src="({t_img_url filename=$item.image_filename w=76 h=76 noimg=no_logo_small})" alt="({$item.commu_name})" /></span>
    1212                            <dl>
    13                                 <dt>({$item.comment_datetime|date_format:"%m/%d"})</dt>
     13                                <dt>({$item.u_datetime|date_format:"%m/%d"})</dt>
    1414                                <dd>({$item.name})&nbsp;(({$item.count_comments|number_format}))&nbsp;(({$item.commu_name}))</dd>
    1515                            </dl>
     
    3232                    <dl>
    3333                        ({foreach from=$data.contents item=item})
    34                         <dt>({$item.comment_datetime|date_format:"%m/%d"})</dt>
     34                        <dt>({$item.u_datetime|date_format:"%m/%d"})</dt>
    3535                        <dd>({$item.name})&nbsp;(({$item.count_comments|number_format}))&nbsp;(({$item.commu_name}))</dd>
    3636                        ({/foreach})
Note: See TracChangeset for help on using the changeset viewer.