Merge branch 'BusinessFields' into Dev

This commit is contained in:
Romain Neutron
2012-03-26 14:21:16 +02:00
80 changed files with 6309 additions and 1564 deletions

View File

@@ -44,7 +44,7 @@ class module_console_checkExtension extends Command
if (!extension_loaded('phrasea2'))
printf("Missing Extension php-phrasea");
$appbox = \appbox::get_instance();
$appbox = \appbox::get_instance(\bootstrap::getCore());
$registry = $appbox->get_registry();
$usr_id = $input->getOption('usr_id');

View File

@@ -49,8 +49,10 @@ class module_console_schedulerState extends Command
{
$appbox = appbox::get_instance(\bootstrap::getCore());
$task_manager = new task_manager($appbox);
$state = $task_manager->get_scheduler_state();
if ($state['schedstatus'] == 'started')
if ($state['status'] == 'started')
{
$output->writeln(sprintf(
'Scheduler is %s on pid %d'
@@ -60,7 +62,7 @@ class module_console_schedulerState extends Command
}
else
{
$output->writeln(sprintf('Scheduler is %s', $state['schedstatus']));
$output->writeln(sprintf('Scheduler is %s', $state['status']));
}
return 0;

View File

@@ -139,7 +139,7 @@ class module_console_systemExport extends Command
$output->writeln("Export datas from selected base_ids");
}
$appbox = \appbox::get_instance();
$appbox = \appbox::get_instance(\bootstrap::getCore());
$total = $errors = 0;
@@ -298,8 +298,9 @@ class module_console_systemExport extends Command
{
case 'xml':
$pathinfo = pathinfo($dest_file->getPathname());
$xml = $record->get_caption()->serialize(caption_record::SERIALIZE_XML);
$xml_file = dirname($outfile) . '/' . $pathinfo['filename'] . '.xml';
file_put_contents($xml_file, $record->get_xml());
file_put_contents($xml_file, $xml);
break;
default:
break;

View File

@@ -75,14 +75,12 @@ class module_console_taskrun extends Command
return 1;
}
require_once __DIR__ . '/../../../../lib/bootstrap.php';
$task_id = (int) $input->getArgument('task_id');
if ($task_id <= 0 || strlen($task_id) !== strlen($input->getArgument('task_id')))
throw new \RuntimeException('Argument must be an Id.');
$appbox = appbox::get_instance();
$appbox = \appbox::get_instance(\bootstrap::getCore());
$task_manager = new task_manager($appbox);
$this->task = $task_manager->get_task($task_id);