mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
Merge branch '3.6' of github.com:alchemy-fr/Phraseanet into 3.6
This commit is contained in:
@@ -37,7 +37,7 @@ class module_console_fieldsList extends Command
|
||||
public function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
|
||||
$appbox = \appbox::get_instance();
|
||||
$appbox = \appbox::get_instance(\bootstrap::getCore());
|
||||
|
||||
foreach ($appbox->get_databoxes() as $databox)
|
||||
{
|
||||
|
@@ -40,7 +40,7 @@ class module_console_sphinxGenerateSuggestion extends Command
|
||||
define('FREQ_THRESHOLD', 10);
|
||||
define('SUGGEST_DEBUG', 0);
|
||||
|
||||
$appbox = \appbox::get_instance();
|
||||
$appbox = \appbox::get_instance(\bootstrap::getCore());
|
||||
$registry = $appbox->get_registry();
|
||||
|
||||
$params = phrasea::sbas_params();
|
||||
@@ -60,7 +60,19 @@ class module_console_sphinxGenerateSuggestion extends Command
|
||||
$databox = databox::get_instance($sbas_id);
|
||||
|
||||
$output->writeln("process Databox " . $databox->get_viewname() . " / $index\n");
|
||||
|
||||
|
||||
if(!is_executable("/usr/local/bin/indexer"))
|
||||
{
|
||||
$output->writeln("<error>'/usr/local/bin/indexer' is not executable</error>");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(!file_exists($tmp_file))
|
||||
{
|
||||
$output->writeln("<error> file '".$tmp_file."' does not exist</error>");
|
||||
return 1;
|
||||
}
|
||||
|
||||
$cmd = '/usr/local/bin/indexer metadatas' . $index . ' --buildstops ' . $tmp_file . ' 1000000 --buildfreqs';
|
||||
exec($cmd);
|
||||
|
||||
|
Reference in New Issue
Block a user