mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
ask to write metadata only if record has subdefs
This commit is contained in:
@@ -1107,8 +1107,11 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
||||
$this->set_xml($xml);
|
||||
unset($xml);
|
||||
|
||||
$this->write_metas();
|
||||
$this->dispatch(RecordEvents::METADATA_CHANGED, new MetadataChangedEvent($this));
|
||||
// if there is yet subdefs, ask to write metadata
|
||||
if (count($this->getMediaSubdefRepository()->findByRecordIdsAndNames([$this->getRecordId()])) > 1 ) {
|
||||
$this->write_metas();
|
||||
$this->dispatch(RecordEvents::METADATA_CHANGED, new MetadataChangedEvent($this));
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user