v1.4.8e Fixed so when you edit a guide or a event the images gets added and its not just blank for some strange reason, but you cant edit images yet .

This commit is contained in:
2020-10-26 14:59:16 +01:00
parent 1109990fba
commit 005cf821c9
4 changed files with 14 additions and 3 deletions
@@ -193,8 +193,14 @@ class EventController extends Controller
$news->subname = $event->name;
$news->arrangement_id = $event->id;
$news->type_id = '3';
$news->resource_id = $event->resource_id;
$news->content = "<p>" . $this->closetags(substr($event->description, 0, 300));
if($request->file("resource")) {
$event->resource_id = ResourceController::store($request)->id;
}
NewsController::storeAndGet($news);
}
@@ -149,6 +149,10 @@ class GuideController extends Controller
$news->arrangement_id = $guide->id;
$news->type_id = '4';
if($guide->resource_id !== null)
$news->resource_id = $guide->resource_id;
$news->content = $this->closetags(substr($guidee->guide_articles, 0, 300));
NewsController::storeAndGet($news);