PHRAS-2161_coll-id-in-log-docs_MASTER

mysql fix : add "" to "action" (as default value) to structure
add: action "collection_from" to move_record in app

todo : fix log2es plugin.

wip
This commit is contained in:
Jean-Yves Gaulier
2018-07-23 18:02:47 +02:00
parent b65500bb40
commit f130faccb6
3 changed files with 5 additions and 2 deletions

View File

@@ -32,6 +32,7 @@ class Session_Logger
const EVENT_EXPORTDOWNLOAD = 'download';
const EVENT_EXPORTFTP = 'ftp';
const EVENT_EXPORTMAIL = 'mail';
const EVENT_MOVE_FROM = 'collection_from';
const EVENT_MOVE = 'collection';
const EVENT_PRINT = 'print';
const EVENT_PUSH = 'push';
@@ -41,7 +42,6 @@ class Session_Logger
/**
*
* @param Application $app
* @param databox $databox
* @param integer $log_id
*

View File

@@ -529,6 +529,9 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
return $this;
}
$this->app['phraseanet.logger']($this->getDatabox())
->log($this, Session_Logger::EVENT_MOVE_FROM, $this->getCollectionId(), '');
$sql = "UPDATE record SET moddate = NOW(), coll_id = :coll_id WHERE record_id =:record_id";
$params = [

View File

@@ -2519,7 +2519,7 @@
</field>
<field>
<name>action</name>
<type>enum('push','add','validate','edit','collection','status','print','substit','publish','download','mail','ftp','delete')</type>
<type>enum('push','add','validate','edit','collection','status','print','substit','publish','download','mail','ftp','delete','collection_to','')</type>
<null></null>
<extra></extra>
<default></default>