From ef0b5131ce70c0ceb8f52662e6d4c37a2eb91a07 Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Fri, 15 Feb 2019 13:55:14 +0100 Subject: [PATCH] also set publication date during publishing --- app/Http/Controllers/Settings/WorkflowController.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Settings/WorkflowController.php b/app/Http/Controllers/Settings/WorkflowController.php index 9e25bdc..cb5350b 100644 --- a/app/Http/Controllers/Settings/WorkflowController.php +++ b/app/Http/Controllers/Settings/WorkflowController.php @@ -47,9 +47,11 @@ class WorkflowController extends Controller //$this->_workflowHelper->changeState($document, $targetState); $dataset->setServerState($targetState); - // if ($targetState == 'published') { - // $this->_sendNotification($document, $form); - // } + if ($targetState == 'published') { + //$this->_sendNotification($document, $form); + $time = new \Illuminate\Support\Carbon(); + $dataset->server_date_published = $time; + } $dataset->save(); session()->flash('flash_message', 'You have puplished 1 dataset!'); return redirect()->route('settings.review.index');