REFACTORING #1880 @4h30m: another ugly refactoring commit

This commit is contained in:
Michal Kváček
2016-10-25 16:50:04 +02:00
parent 28f67ffe3c
commit cc999dd24e
71 changed files with 827 additions and 608 deletions
@@ -14,12 +14,12 @@ class CreateNewComment extends Controller
public function postNew(\Modules\Blog\Article\Http\Requests\CreateNewComment $request, $articleId)
{
$article = Content::where('id', $articleId)
->where('module_handler', Article::class)
->where('moduleHandler', Article::class)
->firstOrFail();
$article->module_settings = json_decode($article->module_settings);
$article->moduleSettings = json_decode($article->moduleSettings);
if (!isset($article->module_settings->allowComments) || !$article->module_settings->allowComments) {
if (!isset($article->moduleSettings->allowComments) || !$article->moduleSettings->allowComments) {
return redirect()
->route('page.content', ['url' => $article->url])
->with('error', trans('article::comments.disabledComments'));