diff --git a/lib/Alchemy/Phrasea/Command/CreateCollection.php b/lib/Alchemy/Phrasea/Command/CreateCollection.php index b7f8d6eb5a..c67001f31e 100644 --- a/lib/Alchemy/Phrasea/Command/CreateCollection.php +++ b/lib/Alchemy/Phrasea/Command/CreateCollection.php @@ -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; diff --git a/lib/Alchemy/Phrasea/Command/RecordAdd.php b/lib/Alchemy/Phrasea/Command/RecordAdd.php index 6fbb32ba65..87de1fc663 100644 --- a/lib/Alchemy/Phrasea/Command/RecordAdd.php +++ b/lib/Alchemy/Phrasea/Command/RecordAdd.php @@ -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'))); } diff --git a/lib/Alchemy/Phrasea/Command/Upgrade/Step31.php b/lib/Alchemy/Phrasea/Command/Upgrade/Step31.php index 0d125d027a..57c38705ef 100644 --- a/lib/Alchemy/Phrasea/Command/Upgrade/Step31.php +++ b/lib/Alchemy/Phrasea/Command/Upgrade/Step31.php @@ -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);