Changeset 10582
- Timestamp:
- Jan 31, 2009, 9:30:31 PM (14 years ago)
- Location:
- OpenPNE3/trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE3/trunk/apps/pc_frontend/i18n/messages.ja.xml
r10545 r10582 463 463 <target>メンバー登録</target> 464 464 </trans-unit> 465 <trans-unit id=""> 466 <source>Cannot add an image any more.</source> 467 <target>これ以上画像を追加できません。</target> 468 </trans-unit> 465 469 </body> 466 470 </file> -
OpenPNE3/trunk/apps/pc_frontend/modules/member/actions/actions.class.php
r10340 r10582 98 98 public function executeConfigImage($request) 99 99 { 100 if ($request->isXmlHttpRequest())101 {102 $this->setLayout('plain');103 }104 105 100 $options = array('member' => $this->getUser()->getMember()); 106 101 $this->form = new MemberImageForm(array(), $options); … … 108 103 if ($request->isMethod('post')) 109 104 { 110 $this->form->bindAndSave($request->getParameter('member_image'), $request->getFiles('member_image')); 111 $this->redirect('member/configImage'); 105 try 106 { 107 $this->form->bindAndSave($request->getParameter('member_image'), $request->getFiles('member_image')); 108 $this->redirect('member/configImage'); 109 } 110 catch (opRuntimeException $e) 111 { 112 $this->getUser()->setFlash('error', $e->getMessage()); 113 } 112 114 } 113 115 } -
OpenPNE3/trunk/lib/filter/sfOpenPNEExecutionFilter.class.php
r10003 r10582 30 30 ))); 31 31 32 $result = parent::handleAction($filterChain, $actionInstance); 32 try 33 { 34 $result = parent::handleAction($filterChain, $actionInstance); 35 } 36 catch (opRuntimeException $e) 37 { 38 $this->forwardToErrorAction(); 39 } 33 40 34 41 $dispatcher->notify(new sfEvent($this, 'op_action.post_execute_'.$moduleName.'_'.$actionName, array( … … 67 74 } 68 75 } 76 77 protected function forwardToErrorAction() 78 { 79 $this->context->getController()->forward('default', 'error'); 80 81 throw new sfStopException(); 82 } 69 83 } -
OpenPNE3/trunk/lib/form/MemberImageForm.class.php
r10003 r10582 41 41 if ($count >= 3) 42 42 { 43 throw new sfException('Cannot add an image any more.');43 throw new opRuntimeException('Cannot add an image any more.'); 44 44 } 45 45 -
OpenPNE3/trunk/test/functional/pc_frontend/memberActionsTest.php
r10580 r10582 41 41 ))) 42 42 ->isStatusCode(200) 43 ->with('response')->begin() 44 ->checkElement('#flashError td:contains("これ以上画像を追加できません。")', true) 45 ->end() 43 46 ;
Note: See TracChangeset
for help on using the changeset viewer.