mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-27 09:21:04 -06:00
Add debug information to import routine.
This commit is contained in:
parent
f1d77bdb50
commit
28579f7b80
@ -100,6 +100,7 @@ class IndexController extends Controller
|
||||
$config['initial-config-complete'] = false;
|
||||
$config['has-file-upload'] = false;
|
||||
$config['delimiter'] = "\t" === $config['delimiter'] ? 'tab' : $config['delimiter'];
|
||||
unset($config['stage']);
|
||||
|
||||
$result = json_encode($config, JSON_PRETTY_PRINT);
|
||||
$name = sprintf('"%s"', addcslashes('import-configuration-' . date('Y-m-d') . '.json', '"\\'));
|
||||
|
@ -225,11 +225,17 @@ class ImportJobRepository implements ImportJobRepositoryInterface
|
||||
$configFileObject = new SplFileObject($file->getRealPath());
|
||||
$configRaw = $configFileObject->fread($configFileObject->getSize());
|
||||
$configuration = json_decode($configRaw, true);
|
||||
|
||||
Log::debug(sprintf('Raw configuration is %s', $configRaw));
|
||||
if (null !== $configuration && is_array($configuration)) {
|
||||
Log::debug('Found configuration', $configuration);
|
||||
$this->setConfiguration($job, $configuration);
|
||||
}
|
||||
if (null === $configuration) {
|
||||
Log::error('Uploaded configuration is NULL');
|
||||
}
|
||||
if (false === $configuration) {
|
||||
Log::error('Uploaded configuration is FALSE');
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -113,6 +113,7 @@ class Initial implements ConfigurationInterface
|
||||
|
||||
// process config, if present:
|
||||
if (isset($data['configuration_file'])) {
|
||||
Log::debug('Will also upload configuration.');
|
||||
$this->repository->processConfiguration($this->job, $data['configuration_file']);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user