diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/ApiController.php | 2 | ||||
-rw-r--r-- | lib/Db/IndexesRequestBuilder.php | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index 2b3ff55..1ac2189 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -31,7 +31,7 @@ declare(strict_types=1); namespace OCA\FullTextSearch\Controller; -use daita\MySmallPhpTools\Traits\TNCDataResponse; +use daita\MySmallPhpTools\Traits\Nextcloud\TNCDataResponse; use Exception; use OCA\FullTextSearch\AppInfo\Application; use OCA\FullTextSearch\Model\SearchRequest; diff --git a/lib/Db/IndexesRequestBuilder.php b/lib/Db/IndexesRequestBuilder.php index b76230d..fd2b7b5 100644 --- a/lib/Db/IndexesRequestBuilder.php +++ b/lib/Db/IndexesRequestBuilder.php @@ -31,6 +31,7 @@ declare(strict_types=1); namespace OCA\FullTextSearch\Db; +use daita\MySmallPhpTools\Traits\TArrayTools; use OCA\FullTextSearch\Model\Index; use OCP\DB\QueryBuilder\IQueryBuilder; @@ -43,6 +44,9 @@ use OCP\DB\QueryBuilder\IQueryBuilder; class IndexesRequestBuilder extends CoreRequestBuilder { + use TArrayTools; + + /** * Base of the Sql Insert request * @@ -111,7 +115,7 @@ class IndexesRequestBuilder extends CoreRequestBuilder { protected function parseIndexesSelectSql(array $data): Index { $index = new Index($data['provider_id'], $data['document_id']); $index->setStatus((int)$data['status']) - ->setSource($data['source']) + ->setSource($this->get('source', $data, '')) ->setOwnerId($data['owner_id']) ->setLastIndex((int)$data['indexed']); $index->setOptions(json_decode($data['options'], true)); |