mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +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;
|
namespace Alchemy\Phrasea\Controller\Prod;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Application\Helper\DataboxLoggerAware;
|
||||||
use Alchemy\Phrasea\Controller\Controller;
|
use Alchemy\Phrasea\Controller\Controller;
|
||||||
use Alchemy\Phrasea\Controller\RecordsRequest;
|
use Alchemy\Phrasea\Controller\RecordsRequest;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
@@ -16,6 +17,8 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
|
|
||||||
class PropertyController extends Controller
|
class PropertyController extends Controller
|
||||||
{
|
{
|
||||||
|
use DataboxLoggerAware;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display Status property
|
* Display Status property
|
||||||
*
|
*
|
||||||
@@ -198,6 +201,9 @@ class PropertyController extends Controller
|
|||||||
|
|
||||||
$record->setStatus(strrev($newStatus));
|
$record->setStatus(strrev($newStatus));
|
||||||
|
|
||||||
|
$this->getDataboxLogger($record->getDatabox())
|
||||||
|
->log($record, \Session_Logger::EVENT_STATUS, '', '');
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'current_status' => $currentStatus,
|
'current_status' => $currentStatus,
|
||||||
'new_status' => $newStatus,
|
'new_status' => $newStatus,
|
||||||
|
@@ -25,7 +25,9 @@ class Property implements ControllerProviderInterface, ServiceProviderInterface
|
|||||||
public function register(Application $app)
|
public function register(Application $app)
|
||||||
{
|
{
|
||||||
$app['controller.prod.property'] = $app->share(function (PhraseaApplication $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