diff --git a/src/FluxBB/Actions/ReplyPage.php b/src/FluxBB/Actions/ReplyPage.php new file mode 100644 index 0000000..17097b6 --- /dev/null +++ b/src/FluxBB/Actions/ReplyPage.php @@ -0,0 +1,23 @@ +findOrFail($tid); + + $this->data['topic'] = $topic; + $this->data['action'] = trans('fluxbb::post.post_a_reply'); + } +} diff --git a/src/FluxBB/Controllers/PostingController.php b/src/FluxBB/Controllers/PostingController.php index 8d0fba7..5abda02 100644 --- a/src/FluxBB/Controllers/PostingController.php +++ b/src/FluxBB/Controllers/PostingController.php @@ -17,21 +17,6 @@ class PostingController extends BaseController { - public function getReply($tid) - { - $topic = Topic::with('forum.perms') - ->where('id', '=', $tid) - ->first(); - - if (is_null($topic)) { - App::abort(404); - } - - return View::make('fluxbb::posting.post') - ->with('topic', $topic) - ->with('action', trans('fluxbb::post.post_a_reply')); - } - public function getTopic($fid) { $forum = Forum::with('perms') diff --git a/src/routes.php b/src/routes.php index 5402ea1..14a327f 100644 --- a/src/routes.php +++ b/src/routes.php @@ -44,10 +44,7 @@ 'as' => 'post_quote', 'uses' => 'FluxBB\Controllers\PostingController@getQuote', )); - Route::get('topic/{id}/reply', array( - 'as' => 'reply', - 'uses' => 'FluxBB\Controllers\PostingController@getReply', - )); + Route::get('topic/{id}/reply', array('as' => 'reply', 'uses' => $actionRoute('FluxBB\Actions\ReplyPage'))); Route::post('topic/{id}/reply', $actionRoute('FluxBB\Actions\Reply')); Route::get('forum/{id}/topic/new', array( 'as' => 'new_topic',