diff --git a/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php b/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php index ff834ab119..74022f1422 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php @@ -9,6 +9,7 @@ */ namespace Alchemy\Phrasea\Controller\Prod; +use Alchemy\Phrasea\Application\Helper\DataboxLoggerAware; use Alchemy\Phrasea\Controller\Controller; use Alchemy\Phrasea\Controller\RecordsRequest; use Symfony\Component\HttpFoundation\Request; @@ -16,6 +17,8 @@ use Symfony\Component\HttpFoundation\Response; class PropertyController extends Controller { + use DataboxLoggerAware; + /** * Display Status property * @@ -198,6 +201,9 @@ class PropertyController extends Controller $record->setStatus(strrev($newStatus)); + $this->getDataboxLogger($record->getDatabox()) + ->log($record, \Session_Logger::EVENT_STATUS, '', ''); + return [ 'current_status' => $currentStatus, 'new_status' => $newStatus, diff --git a/lib/Alchemy/Phrasea/ControllerProvider/Prod/Property.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Property.php index b5ab3a790b..e1a044c2da 100644 --- a/lib/Alchemy/Phrasea/ControllerProvider/Prod/Property.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Property.php @@ -25,7 +25,9 @@ class Property implements ControllerProviderInterface, ServiceProviderInterface public function register(Application $app) { $app['controller.prod.property'] = $app->share(function (PhraseaApplication $app) { - return (new PropertyController($app)); + return (new PropertyController($app)) + ->setDataboxLoggerLocator($app['phraseanet.logger']) + ; }); }