PHRAS-3389_use-only-conceptpaths-from-selected-dbs_MASTER

fix : fixed preview was not displayed (caused by missing di)
This commit is contained in:
jygaulier
2021-04-14 09:56:16 +02:00
parent e1766103a6
commit 374e617d2e
4 changed files with 19 additions and 20 deletions

View File

@@ -93,7 +93,7 @@ class record_preview extends record_adapter
throw new \LogicException('Search Engine should be provided');
}
if (!$options) {
$options = new SearchEngineOptions();
$options = new SearchEngineOptions($app['repo.collection-references']);
}
$options->setFirstResult($pos);
$options->setMaxResults(1);
@@ -197,7 +197,7 @@ class record_preview extends record_adapter
switch ($this->env) {
case 'RESULT':
$options = $this->options ?: new SearchEngineOptions();
$options = $this->options ?: new SearchEngineOptions($this->app['repo.collection-references']);
$options->setFirstResult(($this->pos - 3) < 0 ? 0 : ($this->pos - 3));
$options->setMaxResults(56);