mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 21:43:18 +00:00
PHRAS-1158_STAMP-CHANGE-COLL
fix : the stamp was not updated when a record changed of collection #time 2h
This commit is contained in:
@@ -475,6 +475,10 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
// remove stamp BEFORE changing collection since it uses the collection id :(
|
||||
// todo : change clearStampCache() to be agnostic of collection
|
||||
$this->clearStampCache();
|
||||
|
||||
$sql = "UPDATE record SET moddate = NOW(), coll_id = :coll_id WHERE record_id =:record_id";
|
||||
|
||||
$params = [
|
||||
@@ -993,6 +997,8 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
||||
$this->set_metadata($param, $this->getDatabox());
|
||||
}
|
||||
|
||||
$this->clearStampCache();
|
||||
|
||||
$xml = new DOMDocument();
|
||||
$xml->loadXML($this->app['serializer.caption']->serialize($this->get_caption(), CaptionSerializer::SERIALIZE_XML, true));
|
||||
|
||||
@@ -1292,6 +1298,12 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public function clearStampCache()
|
||||
{
|
||||
$this->getCollection()->reset_stamp($this->getRecordId());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array[] list of deleted files real paths
|
||||
*/
|
||||
|
Reference in New Issue
Block a user