mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 14:03:27 +00:00
Remove use of databox singleton
This commit is contained in:
@@ -42,8 +42,9 @@ class module_console_fieldsDelete extends Command
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$appbox = \appbox::get_instance(\bootstrap::getCore());
|
||||
try {
|
||||
$databox = \databox::get_instance((int) $input->getArgument('sbas_id'));
|
||||
$databox = $appbox->get_databox((int) $input->getArgument('sbas_id'));
|
||||
} catch (\Exception $e) {
|
||||
$output->writeln("<error>Invalid databox id </error>");
|
||||
|
||||
|
@@ -54,8 +54,9 @@ class module_console_fieldsMerge extends Command
|
||||
{
|
||||
$output->writeln("");
|
||||
|
||||
$appbox = \appbox::get_instance(\bootstrap::getCore());
|
||||
try {
|
||||
$databox = \databox::get_instance((int) $input->getArgument('sbas_id'));
|
||||
$databox = $appbox->get_databox((int) $input->getArgument('sbas_id'));
|
||||
} catch (\Exception $e) {
|
||||
$output->writeln("<error>Invalid databox id </error>");
|
||||
|
||||
|
@@ -45,8 +45,9 @@ class module_console_fieldsRename extends Command
|
||||
{
|
||||
$new_name = $input->getArgument('name');
|
||||
|
||||
$appbox = \appbox::get_instance(\bootstrap::getCore());
|
||||
try {
|
||||
$databox = \databox::get_instance((int) $input->getArgument('sbas_id'));
|
||||
$databox = $appbox->get_databox((int) $input->getArgument('sbas_id'));
|
||||
} catch (\Exception $e) {
|
||||
$output->writeln("<error>Invalid databox id </error>");
|
||||
|
||||
|
@@ -57,7 +57,7 @@ class module_console_sphinxGenerateSuggestion extends Command
|
||||
|
||||
$tmp_file = $registry->get('GV_RootPath') . 'tmp/dict' . $index . '.txt';
|
||||
|
||||
$databox = databox::get_instance($sbas_id);
|
||||
$databox = $appbox->get_databox($sbas_id);
|
||||
|
||||
$output->writeln("process Databox " . $databox->get_viewname() . " / $index\n");
|
||||
|
||||
|
@@ -290,7 +290,8 @@ class module_report_activity extends module_report
|
||||
$filter = $s->getFilters();
|
||||
$conn = $s->getConnBas();
|
||||
|
||||
$databox = \databox::get_instance($this->sbas_id);
|
||||
$appbox = \appbox::get_instance(\bootstrap::getCore());
|
||||
$databox = $appbox->get_databox($this->sbas_id);
|
||||
|
||||
$params = array();
|
||||
$date_filter = $filter->getDateFilter();
|
||||
|
@@ -210,7 +210,8 @@ class module_report_download extends module_report
|
||||
|
||||
public static function getTopDl($dmin, $dmax, $sbas_id, $list_coll_id)
|
||||
{
|
||||
$databox = \databox::get_instance((int) $sbas_id);
|
||||
$appbox = \appbox::get_instance(\bootstrap::getCore());
|
||||
$databox = $appbox->get_databox((int) $sbas_id);
|
||||
$conn = $databox->get_connection();
|
||||
|
||||
$registry = $databox->get_registry();
|
||||
|
Reference in New Issue
Block a user