From 80fa1b2ccdb0ae9783932ea795e89039d3df6894 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Tue, 16 Feb 2016 12:28:53 -0500
Subject: [PATCH] Code simplification.

---
 module/VuFind/src/VuFind/Db/Table/Search.php | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/module/VuFind/src/VuFind/Db/Table/Search.php b/module/VuFind/src/VuFind/Db/Table/Search.php
index 32e54b49b15..6aa48e6c261 100644
--- a/module/VuFind/src/VuFind/Db/Table/Search.php
+++ b/module/VuFind/src/VuFind/Db/Table/Search.php
@@ -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());
-- 
GitLab