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

Ignore:
Timestamp:
Mar 26, 2009, 12:34:49 AM (13 years ago)
Author:
ebihara
Message:

#3672:added some limitation checks when a member tries to participate in an event

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/opCommunityTopicPlugin/trunk/lib/action/opCommunityTopicPluginEventCommentActions.class.php

    r11155 r11170  
    5353    if ($this->form->isValid())
    5454    {
    55       if (!$request->getParameter('comment'))
     55      try
    5656      {
    57         $this->form->getObject()->toggleEventMember($this->getUser()->getMemberId());
     57        if (!$request->getParameter('comment'))
     58        {
     59          $this->form->getObject()->toggleEventMember($this->getUser()->getMemberId());
     60        }
     61
     62        $this->form->save();
     63        $this->redirect('@communityEvent_show?id='.$this->communityEvent->getId());
    5864      }
    59       $this->form->save();
    60 
    61       $this->redirect('@communityEvent_show?id='.$this->communityEvent->getId());
     65      catch (opCommunityEventMemberAppendableException $e)
     66      {
     67        $this->getUser()->setFlash('error', $e->getMessage());
     68      }
    6269    }
    6370
Note: See TracChangeset for help on using the changeset viewer.