From 0c1162589c3c33b7ee54bba4fcaf2a947ced9277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Fri, 1 Apr 2016 17:00:10 +0200 Subject: [PATCH] FIX: fix content edit Content edit was strongly limited only on static pages. This limit was removed in this commit. --- app/Http/Controllers/Admin/EditContent.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Admin/EditContent.php b/app/Http/Controllers/Admin/EditContent.php index 2acab439..dd6c3e49 100644 --- a/app/Http/Controllers/Admin/EditContent.php +++ b/app/Http/Controllers/Admin/EditContent.php @@ -41,11 +41,11 @@ class EditContent extends Controller $statuses = ContentStatuses::getWithTranslations(); // try to find requested page - $page = Content::where('module_handler', config('staticpages.handler')) - ->findOrFail($id); + $page = Content::findOrFail($id); + $page->module_settings = json_decode($page->module_settings); $allModules = ModulesHandlerToId::getWithTranslations(); - $moduleId = $allModules[config('staticpages.handler')]; + $moduleId = $allModules[$page->module_handler]; $templates = Template::where('module_id', $moduleId) ->select(['template_name', 'name', 'description']) ->get();