mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
Merge branch 'master' into PHRAS-2979-41-fix-right-access
This commit is contained in:
@@ -19,6 +19,7 @@ use Alchemy\Phrasea\Core\Event\Record\OriginalNameChangedEvent;
|
||||
use Alchemy\Phrasea\Core\Event\Record\RecordEvent;
|
||||
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
||||
use Alchemy\Phrasea\Core\Event\Record\StatusChangedEvent;
|
||||
use Alchemy\Phrasea\Core\Event\Record\SubdefinitionCreateEvent;
|
||||
use Alchemy\Phrasea\Core\PhraseaTokens;
|
||||
use Alchemy\Phrasea\Databox\Subdef\MediaSubdefRepository;
|
||||
use Alchemy\Phrasea\Filesystem\FilesystemService;
|
||||
@@ -284,7 +285,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
||||
$this->getDataboxConnection()->executeUpdate($sql, ['type' => $type, 'record_id' => $this->getRecordId()]);
|
||||
|
||||
if ($old_type !== $type) {
|
||||
$this->rebuild_subdefs();
|
||||
$this->dispatch(RecordEvents::SUBDEFINITION_CREATE, new SubdefinitionCreateEvent($this));
|
||||
}
|
||||
|
||||
$this->type = $type;
|
||||
@@ -341,7 +342,8 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
||||
array(':mime' => $mime, ':record_id' => $this->getRecordId())
|
||||
)) {
|
||||
|
||||
$this->rebuild_subdefs();
|
||||
$this->dispatch(RecordEvents::SUBDEFINITION_CREATE, new SubdefinitionCreateEvent($this));
|
||||
|
||||
$this->delete_data_from_cache();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user