mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
Move engine query log process from search engine classes to controllers
This commit is contained in:
@@ -14,6 +14,7 @@ use Alchemy\Phrasea\Application;
|
||||
use Alchemy\Phrasea\Border\File;
|
||||
use Alchemy\Phrasea\Border\Attribute\Status;
|
||||
use Alchemy\Phrasea\Border\Manager as BorderManager;
|
||||
use Entities\UserQuery;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
@@ -895,6 +896,13 @@ class API_V1_adapter extends API_V1_Abstract
|
||||
|
||||
$search_result = $this->app['phraseanet.SE']->query($query, $offsetStart, $perPage);
|
||||
|
||||
$userQuery = new UserQuery();
|
||||
$userQuery->setUsrId($this->app['authentication']->getUser()->get_id());
|
||||
$userQuery->setQuery($query);
|
||||
|
||||
$this->app['EM']->persist($userQuery);
|
||||
$this->app['EM']->flush();
|
||||
|
||||
foreach ($options->getDataboxes() as $databox) {
|
||||
$colls = array_map(function(\collection $collection) {
|
||||
return $collection->get_coll_id();
|
||||
|
Reference in New Issue
Block a user