mirror of
https://github.com/Codappix/search_core.git
synced 2024-12-25 19:36:10 +01:00
TASK: Fix PR issues
This commit is contained in:
parent
aebe58721d
commit
7ca998c03a
7 changed files with 8 additions and 11 deletions
|
@ -44,7 +44,7 @@ class CopyToProcessor implements ProcessorInterface
|
|||
{
|
||||
foreach ($from as $property => $value) {
|
||||
if (is_array($value)) {
|
||||
$this->addArray($to, $value, $exclude);
|
||||
$this->addArray($to, $value);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ namespace Codappix\SearchCore\Domain\Index;
|
|||
|
||||
use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
|
||||
use Codappix\SearchCore\Configuration\InvalidArgumentException;
|
||||
use Codappix\SearchCore\Domain\Index\IndexerInterface;
|
||||
use Codappix\SearchCore\Domain\Index\TcaIndexer;
|
||||
use Codappix\SearchCore\Domain\Index\TcaIndexer\TcaTableService;
|
||||
use TYPO3\CMS\Core\SingletonInterface as Singleton;
|
||||
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
|
||||
|
|
|
@ -72,14 +72,16 @@ class PagesIndexer extends TcaIndexer
|
|||
}
|
||||
|
||||
$content = $this->fetchContentForPage($record['uid']);
|
||||
$record['content'] = $content['content'];
|
||||
$record['media'] = array_unique(array_merge($record['media'], $content['images']));
|
||||
if ($content !== []) {
|
||||
$record['content'] = $content['content'];
|
||||
$record['media'] = array_unique(array_merge($record['media'], $content['images']));
|
||||
}
|
||||
parent::prepareRecord($record);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $uid
|
||||
* @return string
|
||||
* @return []
|
||||
*/
|
||||
protected function fetchContentForPage($uid)
|
||||
{
|
||||
|
@ -92,7 +94,7 @@ class PagesIndexer extends TcaIndexer
|
|||
|
||||
if ($contentElements === null) {
|
||||
$this->logger->debug('No content for page ' . $uid);
|
||||
return '';
|
||||
return [];
|
||||
}
|
||||
|
||||
$this->logger->debug('Fetched content for page ' . $uid);
|
||||
|
|
|
@ -117,7 +117,7 @@ class RelationResolver implements Singleton
|
|||
}
|
||||
|
||||
/**
|
||||
* @param array Column config.
|
||||
* @param array $config Column config.
|
||||
* @return bool
|
||||
*/
|
||||
protected function isRelation(array &$config)
|
||||
|
|
|
@ -22,7 +22,6 @@ namespace Codappix\SearchCore\Domain\Search;
|
|||
|
||||
use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
|
||||
use Codappix\SearchCore\Configuration\InvalidArgumentException;
|
||||
use Codappix\SearchCore\Connection\ConnectionInterface;
|
||||
use Codappix\SearchCore\Connection\Elasticsearch\Query;
|
||||
use Codappix\SearchCore\Connection\SearchRequestInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
|
|
@ -23,7 +23,6 @@ namespace Codappix\SearchCore\Domain\Service;
|
|||
use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
|
||||
use Codappix\SearchCore\Domain\Index\IndexerFactory;
|
||||
use Codappix\SearchCore\Domain\Index\NoMatchingIndexerException;
|
||||
use Codappix\SearchCore\Domain\Index\TcaIndexer;
|
||||
use TYPO3\CMS\Core\SingletonInterface as Singleton;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ namespace Codappix\SearchCore\Hook;
|
|||
*/
|
||||
|
||||
use Codappix\SearchCore\Configuration\NoConfigurationException;
|
||||
use Codappix\SearchCore\Domain\Index\NoMatchingIndexerException;
|
||||
use Codappix\SearchCore\Domain\Service\DataHandler as OwnDataHandler;
|
||||
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
||||
use TYPO3\CMS\Core\DataHandling\DataHandler as CoreDataHandler;
|
||||
|
|
Loading…
Reference in a new issue