The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 80fa1b2c authored by Demian Katz's avatar Demian Katz
Browse files

Code simplification.

parent 687f7698
No related merge requests found
......@@ -159,11 +159,8 @@ class Search extends Gateway
// Duplicate elimination
$newUrl = $newSearch->getUrlQuery()->getParams();
foreach ($searchHistory as $oldSearch) {
// Deminify the old search (note that if we have a resource, we need
// to grab the contents -- this is necessary for PostgreSQL compatibility
// although MySQL returns a plain string).
$minSO = $oldSearch->getSearchObject();
$dupSearch = $minSO->deminify($manager);
// Deminify the old search:
$dupSearch = $oldSearch->getSearchObject()->deminify($manager);
// See if the classes and urls match
$oldUrl = $dupSearch->getUrlQuery()->getParams();
if (get_class($dupSearch) == get_class($newSearch)
......@@ -187,7 +184,6 @@ class Search extends Gateway
$data = [
'session_id' => $sessionId,
'created' => date('Y-m-d'),
'search_object' => serialize(new minSO($newSearch))
];
$this->insert($data);
$row = $this->getRowById($this->getLastInsertValue());
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment