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

Changeset 10241


Ignore:
Timestamp:
Jan 20, 2009, 3:00:52 PM (11 years ago)
Author:
nagasawa
Message:

#3285:fixed The newest blog becomes displayed on the profile page

Location:
OpenPNE3/plugins/opBlogPlugin/trunk
Files:
12 added
4 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/opBlogPlugin/trunk/apps/pc_frontend/i18n/messages.ja.xml

    r10229 r10241  
    1919      <target>m月d日</target>
    2020      </trans-unit>
    21      </body>
     21      <trans-unit id="5">
     22      <source>The member id is invalid</source>
     23      <target>メンバーIDが無効です</target>
     24      </trans-unit>
     25      <trans-unit id="6">
     26      <source>The blog is none</source>
     27      <target>ブログがありません</target>
     28      </trans-unit>
     29      <trans-unit id="7">
     30      <source>More info</source>
     31      <target>もっと見る</target>
     32      </trans-unit>
     33    </body>
    2234  </file>
    2335</xliff>
  • OpenPNE3/plugins/opBlogPlugin/trunk/apps/pc_frontend/modules/blog/actions/actions.class.php

    r10229 r10241  
    2727  {
    2828    $this->blogList = BlogPeer::getBlogListByFriend($this->getUser()->getMemberId(), 20);
     29    if (!count($this->blogList))
     30    {
     31      return sfView::ALERT;
     32    }
    2933  }
    3034
     
    3943    $this->blogList = array();
    4044    BlogPeer::getBlogListByMemberId($this->getUser()->getMemberId(), $this->blogList, 20);
     45    if (!count($this->blogList))
     46    {
     47      return sfView::ALERT;
     48    }
     49  }
     50 /**
     51  * Executes profile action
     52  *
     53  * @param sfRequest $request A request object
     54  */
     55  public function executeProfile($request)
     56  {
     57    $this->id = $request->getParameter('id');
     58    $this->member = MemberPeer::retrieveByPk($this->id);
     59    if (!$this->member)
     60    {
     61      return sfView::ERROR;
     62    }
     63    $this->blogList = array();
     64    BlogPeer::getBlogListByMemberId($this->id, $this->blogList, 20);
     65    if (!count($this->blogList))
     66    {
     67      return sfView::ALERT;
     68    }
    4169  }
    4270}
  • OpenPNE3/plugins/opBlogPlugin/trunk/apps/pc_frontend/modules/blog/actions/components.class.php

    r10229 r10241  
    2121  }
    2222
    23   public function executeBlogProfile()
     23  public function executeBlogProfile($request)
    2424  {
    25     $this->blogList = BlogPeer::getBlogListByMemberId($this->getRequest()->getParameter('id'));
     25    $this->blogList = array();
     26    BlogPeer::getBlogListByMemberId($this->id, $this->blogList);
    2627  }
    2728}
  • OpenPNE3/plugins/opBlogPlugin/trunk/apps/pc_frontend/templates/_partsBlogListBox.php

    r10229 r10241  
    1 <div id="<?php echo $id ?>" class="dparts partsNews">
     1<div id="<?php echo $id ?>" class="dparts box">
    22<div class="parts">
    33
     
    66</div>
    77
    8 <div class="block">
     8<div class="block"><div class="body">
    99
    1010<table>
     
    3434</table>
    3535
    36 </div>
     36</div></div>
    3737
    3838</div></div>
Note: See TracChangeset for help on using the changeset viewer.