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

Changeset 9932


Ignore:
Timestamp:
Jan 6, 2009, 12:04:44 AM (14 years ago)
Author:
ebihara
Message:

#3267:fixed fatal error of community/home when number of the community topics is less than seven

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/pc_frontend/modules/communityTopic/templates/_communityTopicList.php

    r9754 r9932  
    99<td>
    1010<ul>
    11 <?php
    12 $communityTopics = CommunityTopicPeer::getTopics($community->getId());
    13 if ($communityTopics) :
    14 for ($i = 0; $i < 7; $i++) :
    15 ?>
     11<?php $communityTopics = CommunityTopicPeer::getTopics($community->getId()); ?>
     12<?php if ($communityTopics) : ?>
     13<?php foreach ($communityTopics as $key => $communityTopic) : ?>
     14<?php if (5 <= $key)
     15{
     16  break;
     17} ?>
    1618<li>
    17 <?php
    18 echo format_datetime($communityTopics[$i]->getUpdatedAt(), 'f');
    19 echo ' ';
    20 echo link_to($communityTopics[$i]->getName().'('.$communityTopics[$i]->countCommunityTopicComments().')', 'communityTopic/detail?id='.$communityTopics[$i]->getId());
    21 ?>
     19<?php echo format_datetime($communityTopic->getUpdatedAt(), 'f'); ?>
     20&nbsp;
     21<?php echo link_to(sprintf('%s(%d)', $communityTopic->getName(), $communityTopic->countCommunityTopicComments()), 'communityTopic/detail?id='.$communityTopic->getId()); ?>
    2222</li>
    23 <?php endfor; ?>
     23<?php endforeach; ?>
    2424<li><?php echo link_to('もっと読む', 'communityTopic/list?community_id='.$community->getId()); ?></li>
    2525<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.