diff options
-rw-r--r-- | composer.lock | 8 | ||||
-rw-r--r-- | lib/Controller/ApiController.php | 2 | ||||
-rw-r--r-- | lib/Db/IndexesRequestBuilder.php | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/composer.lock b/composer.lock index f1f3ea9..4b83258 100644 --- a/composer.lock +++ b/composer.lock @@ -12,12 +12,12 @@ "source": { "type": "git", "url": "https://github.com/daita/my-small-php-tools.git", - "reference": "0cbe626ddff2dc3b72d04d88a42f71e0591352ab" + "reference": "405a5e6afadfd7c0630cf33b9e48a39f6938f605" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/daita/my-small-php-tools/zipball/0cbe626ddff2dc3b72d04d88a42f71e0591352ab", - "reference": "0cbe626ddff2dc3b72d04d88a42f71e0591352ab", + "url": "https://api.github.com/repos/daita/my-small-php-tools/zipball/405a5e6afadfd7c0630cf33b9e48a39f6938f605", + "reference": "405a5e6afadfd7c0630cf33b9e48a39f6938f605", "shasum": "" }, "require": { @@ -40,7 +40,7 @@ } ], "description": "My small PHP Tools", - "time": "2018-11-01T17:21:59+00:00" + "time": "2018-12-08T15:17:26+00:00" } ], "packages-dev": [], 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)); |