Skip to content
This repository has been archived by the owner on Dec 4, 2019. It is now read-only.

Commit

Permalink
Refactor reply action.
Browse files Browse the repository at this point in the history
  • Loading branch information
franzliedke committed Aug 3, 2014
1 parent 52ce254 commit 20b1d37
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/FluxBB/Actions/Reply.php
Expand Up @@ -58,17 +58,19 @@ protected function run()
$this->trigger('user.posted', [$creator, $this->post]);
}

/**
* @return \Illuminate\Http\Response
*/
protected function makeResponse()
protected function hasRedirect()
{
return true;
}

protected function nextRequest()
{
return $this->redirectTo(route('viewpost', ['id' => $this->post->id]))
->withMessage(trans('fluxbb::post.post_added'));
return new Request('viewpost', ['id' => $this->post->id]);
// ->withMessage(trans('fluxbb::post.post_added'));
}

protected function urlOnError()
protected function errorRequest()
{
return route('reply', ['id' => $this->topic->id, 'error' => 'ohyeah']);
return new Request('reply', ['id' => $this->topic->id]);
}
}

0 comments on commit 20b1d37

Please sign in to comment.