Merge branch '3.6' of github.com:alchemy-fr/Phraseanet into 3.6

This commit is contained in:
Romain Neutron
2012-03-15 15:15:13 +01:00
2 changed files with 15 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ class module_console_fieldsList extends Command
public function execute(InputInterface $input, OutputInterface $output) public function execute(InputInterface $input, OutputInterface $output)
{ {
$appbox = \appbox::get_instance(); $appbox = \appbox::get_instance(\bootstrap::getCore());
foreach ($appbox->get_databoxes() as $databox) foreach ($appbox->get_databoxes() as $databox)
{ {

View File

@@ -40,7 +40,7 @@ class module_console_sphinxGenerateSuggestion extends Command
define('FREQ_THRESHOLD', 10); define('FREQ_THRESHOLD', 10);
define('SUGGEST_DEBUG', 0); define('SUGGEST_DEBUG', 0);
$appbox = \appbox::get_instance(); $appbox = \appbox::get_instance(\bootstrap::getCore());
$registry = $appbox->get_registry(); $registry = $appbox->get_registry();
$params = phrasea::sbas_params(); $params = phrasea::sbas_params();
@@ -60,7 +60,19 @@ class module_console_sphinxGenerateSuggestion extends Command
$databox = databox::get_instance($sbas_id); $databox = databox::get_instance($sbas_id);
$output->writeln("process Databox " . $databox->get_viewname() . " / $index\n"); $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'; $cmd = '/usr/local/bin/indexer metadatas' . $index . ' --buildstops ' . $tmp_file . ' 1000000 --buildfreqs';
exec($cmd); exec($cmd);