mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Update commands
This commit is contained in:
@@ -55,11 +55,11 @@ class CreateCollection extends Command
|
||||
$databox = $this->container['phraseanet.appbox']
|
||||
->get_databox((int) $input->getArgument('databox_id'));
|
||||
|
||||
$new_collection = \collection::create($databox, $this->container['phraseanet.appbox'], $input->getArgument('collname'));
|
||||
$new_collection = \collection::create($app, $databox, $this->container['phraseanet.appbox'], $input->getArgument('collname'));
|
||||
|
||||
if ($new_collection && $input->getOption('duplicate_rights_from_base_id')) {
|
||||
|
||||
$query = new \User_Query($this->container['phraseanet.appbox']);
|
||||
$query = new \User_Query($this->container);
|
||||
$total = $query->on_base_ids(array($input->getOption('duplicate_rights_from_base_id')))->get_total();
|
||||
|
||||
$n = 0;
|
||||
|
@@ -58,7 +58,7 @@ class RecordAdd extends Command
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
try {
|
||||
$collection = \collection::get_from_base_id($input->getArgument('base_id'));
|
||||
$collection = \collection::get_from_base_id($app, $input->getArgument('base_id'));
|
||||
} catch (\Exception $e) {
|
||||
throw new \InvalidArgumentException(sprintf('Collection %s is invalid', $input->getArgument('base_id')));
|
||||
}
|
||||
|
@@ -124,7 +124,7 @@ class Step31 implements DatasUpgraderInterface
|
||||
$uuid = \uuid::generate_v4();
|
||||
try {
|
||||
$media = $this->app['mediavorus']->guess($pathfile);
|
||||
$collection = \collection::get_from_coll_id($databox, (int) $record['coll_id']);
|
||||
$collection = \collection::get_from_coll_id($app, $databox, (int) $record['coll_id']);
|
||||
|
||||
$file = new File($media, $collection);
|
||||
$uuid = $file->getUUID(true, true);
|
||||
|
Reference in New Issue
Block a user