mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Merge pull request #2802 from aynsix/PHRAS-2274-port41-changing-status-in-log_docs
PHRAS-2274 port to 4.1 PHRAS-2227 FIX changing status appear in log_docs table
This commit is contained in:
@@ -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,
|
||||
|
@@ -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'])
|
||||
;
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user