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

source: OpenPNE3/plugins/opBlogPlugin/trunk/apps/pc_frontend/modules/blog/actions/actions.class.php @ 10254

Last change on this file since 10254 was 10254, checked in by nagasawa, 11 years ago

#3285:added all member of the newest blog

File size: 1.8 KB
Line 
1<?php
2
3/**
4 * This file is part of the OpenPNE package.
5 * (c) OpenPNE Project (http://www.openpne.jp/)
6 *
7 * For the full copyright and license information, please view the LICENSE
8 * file and the NOTICE file that were distributed with this source code.
9 */
10
11/**
12 * blog actions.
13 *
14 * @package    OpenPNE
15 * @subpackage blog
16 * @author     Your name here
17 * @version    SVN: $Id: actions.class.php 9301 2008-05-27 01:08:46Z dwhittle $
18 */
19class blogActions extends sfActions
20{
21 /**
22  * Executes index action
23  *
24  * @param sfRequest $request A request object
25  */
26  public function executeIndex($request)
27  {
28    $this->blogList = BlogPeer::getBlogListOfAllMember();
29    if (!count($this->blogList))
30    {
31      return sfView::ALERT;
32    }
33  }
34
35 /**
36  * Executes friend action
37  *
38  * @param sfRequest $request A request object
39  */
40  public function executeFriend($request)
41  {
42    $this->blogList = BlogPeer::getBlogListOfFriend($this->getUser()->getMemberId());
43    if (!count($this->blogList))
44    {
45      return sfView::ALERT;
46    }
47  }
48
49 /**
50  * Executes user action
51  *
52  * @param sfRequest $request A request object
53  */
54  public function executeUser($request)
55  {
56    $this->member = $this->getUser()->getMember();
57    $this->blogList = BlogPeer::getBlogListOfMember($this->getUser()->getMemberId());
58    if (!count($this->blogList))
59    {
60      return sfView::ALERT;
61    }
62  }
63 /**
64  * Executes profile action
65  *
66  * @param sfRequest $request A request object
67  */
68  public function executeProfile($request)
69  {
70    $this->id = $request->getParameter('id');
71    $this->member = MemberPeer::retrieveByPk($this->id);
72    if (!$this->member)
73    {
74      return sfView::ERROR;
75    }
76    $this->blogList = BlogPeer::getBlogListOfMember($this->id);
77    if (!count($this->blogList))
78    {
79      return sfView::ALERT;
80    }
81  }
82}
Note: See TracBrowser for help on using the repository browser.