mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
fetched conflicting recordids each time on called
This commit is contained in:
@@ -401,11 +401,6 @@ class Manager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$recordIds = $lazaretFile->getRecordIdsByCheckers($this->app);
|
|
||||||
|
|
||||||
/** $recordIds will be serialized */
|
|
||||||
$lazaretFile->setRecordIds($recordIds);
|
|
||||||
|
|
||||||
$this->app['orm.em']->flush();
|
$this->app['orm.em']->flush();
|
||||||
|
|
||||||
return $lazaretFile;
|
return $lazaretFile;
|
||||||
|
@@ -707,7 +707,7 @@ class V1Controller extends Controller
|
|||||||
'id' => $file->getId(),
|
'id' => $file->getId(),
|
||||||
'quarantine_session' => $session,
|
'quarantine_session' => $session,
|
||||||
'base_id' => $file->getBaseId(),
|
'base_id' => $file->getBaseId(),
|
||||||
'record_id' => $file->getRecordIds()?:[],
|
'record_id' => $file->getRecordIdsByCheckers($this->app)?:[],
|
||||||
'original_name' => $file->getOriginalName(),
|
'original_name' => $file->getOriginalName(),
|
||||||
'sha256' => $file->getSha256(),
|
'sha256' => $file->getSha256(),
|
||||||
'uuid' => $file->getUuid(),
|
'uuid' => $file->getUuid(),
|
||||||
|
@@ -49,11 +49,6 @@ class LazaretFile
|
|||||||
*/
|
*/
|
||||||
private $base_id;
|
private $base_id;
|
||||||
|
|
||||||
/**
|
|
||||||
* @ORM\Column(type="string", length=512)
|
|
||||||
*/
|
|
||||||
private $record_ids;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=36)
|
* @ORM\Column(type="string", length=36)
|
||||||
*/
|
*/
|
||||||
@@ -210,29 +205,6 @@ class LazaretFile
|
|||||||
return $this->base_id;
|
return $this->base_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set record_ids
|
|
||||||
*
|
|
||||||
* @param mixed $recordIds
|
|
||||||
* @return LazaretFile
|
|
||||||
*/
|
|
||||||
public function setRecordIds($recordIds)
|
|
||||||
{
|
|
||||||
$this->record_ids = serialize($recordIds);
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get record_ids
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function getRecordIds()
|
|
||||||
{
|
|
||||||
return unserialize($this->record_ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the Destination Collection
|
* Get the Destination Collection
|
||||||
*
|
*
|
||||||
|
@@ -1,27 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Alchemy\Phrasea\Setup\DoctrineMigrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update LazaretFiles
|
|
||||||
*/
|
|
||||||
class Version20180222113704 extends AbstractMigration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function doUpSql(Schema $schema)
|
|
||||||
{
|
|
||||||
$this->addSql('ALTER TABLE LazaretFiles ADD record_ids VARCHAR(512) NOT NULL AFTER base_id');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function doDownSql(Schema $schema)
|
|
||||||
{
|
|
||||||
$this->addSql('ALTER TABLE LazaretFiles DROP record_ids');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -507,7 +507,6 @@ class LazaretTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
$lazaretFile->setUuid('7b8ef0e3-dc8f-4b66-9e2f-bd049d175124');
|
$lazaretFile->setUuid('7b8ef0e3-dc8f-4b66-9e2f-bd049d175124');
|
||||||
$lazaretFile->setCreated(new \DateTime('-1 day'));
|
$lazaretFile->setCreated(new \DateTime('-1 day'));
|
||||||
$lazaretFile->setUpdated(new \DateTime('now'));
|
$lazaretFile->setUpdated(new \DateTime('now'));
|
||||||
$lazaretFile->setRecordIds([1]);
|
|
||||||
|
|
||||||
return $lazaretFile;
|
return $lazaretFile;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user