diff --git a/languages/en-gb.ini b/languages/en-gb.ini index 320076cb86bbf2d4dd66e2136550f6045ea98e68..1950ecf4400b9c79bdabbcb43148814912cd4b4e 100644 --- a/languages/en-gb.ini +++ b/languages/en-gb.ini @@ -115,8 +115,8 @@ bulk_fail = "Sorry, an error has occurred. Please try again." bulk_noitems_advice = "No items were selected. Please click on a checkbox next to an item and try again." bulk_save_error = "Some data was missing. Your items were not saved." bulk_save_success = "Your item(s) were saved successfully" -By = By by = by +By = By By Alphabetical = "By Alphabetical" By Author = "By Author" By Call Number = "By Classmark" @@ -275,6 +275,8 @@ fav_list_delete = "List has been deleted" fav_list_delete_cancel = "This list was not deleted" fav_list_delete_fail = "Sorry, an error has occurred. Your list was not deleted." Fee = Fee +Feedback Email = "Feedback Email" +feedback_name = "Name" filter_wildcard = "Any" Find = Find Find More = "Find More" @@ -286,6 +288,7 @@ fine_limit_patron = "You have reached your fines limit and cannot renew items" First Name = "First Name" fix_metadata = "Yes, fix the metadata; I'll wait" for search = "for search" +Form Submitted! = "Form Submitted!" Format = Format found = found From = "From" @@ -536,6 +539,7 @@ Place a Hold = "Place a Hold" Playing Time = "Playing Time" Please check back soon = "Please check back soon" Please contact the Library Reference Department for assistance = "Please contact the Library Reference Department for assistance" +Please enable JavaScript. = "Please enable JavaScript." Posted by = "Posted by" posted_on = "on" Preferred Library = "Preferred Library" @@ -625,6 +629,7 @@ Select your carrier = "Select your carrier" Selected = "Selected" select_page = "Select Page" Send = Send +Send us your feedback! = "Send us your feedback!" Sensor Image = "Sensor Image" Serial = Serial Series = Series @@ -680,6 +685,7 @@ test_fail = "Failed" test_fix = "Fix" test_ok = "OK" Text this = "Text this" +Thank you for your feedback. = "Thank you for your feedback." That email address is already used = "That email address is already used" That username is already taken = "That username is already taken" The record you selected is not part of any of your lists. = "The record you selected is not part of any of your lists." diff --git a/module/VuFind/src/VuFind/Controller/AbstractSearch.php b/module/VuFind/src/VuFind/Controller/AbstractSearch.php index 6978ccfbf893f23b44171ba1b04765c82dc42c56..cd1fd8f1984ce66a9a74dbb6f06933f2beb9cc94 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractSearch.php +++ b/module/VuFind/src/VuFind/Controller/AbstractSearch.php @@ -132,7 +132,7 @@ class AbstractSearch extends AbstractBase $userId = $user ? $user->id : false; if ($search->session_id == $sessId || $search->user_id == $userId) { // They do, deminify it to a new object. - $minSO = unserialize($search->search_object); + $minSO = $search->getSearchObject(); $savedSearch = $minSO->deminify($this->getResultsManager()); // Now redirect to the URL associated with the saved search; this @@ -322,7 +322,7 @@ class AbstractSearch extends AbstractBase } // Restore the full search object: - $minSO = unserialize($search->search_object); + $minSO = $search->getSearchObject(); $savedSearch = $minSO->deminify($this->getResultsManager()); // Fail if this is not the right type of search: diff --git a/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php b/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php index 11154478237bbed05bf1524319c155855f82e02b..c676b2c1aa85acb3e23adc6b827f795af4c7f41d 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php @@ -343,7 +343,7 @@ class ResultScroller extends AbstractPlugin $searchTable = $this->getController()->getTable('Search'); $row = $searchTable->getRowById($this->data->searchId, false); if (!empty($row)) { - $minSO = unserialize($row->search_object); + $minSO = $row->getSearchObject(); $manager = $this->getController()->getServiceLocator() ->get('VuFind\SearchResultsPluginManager'); $search = $minSO->deminify($manager); diff --git a/module/VuFind/src/VuFind/Controller/SearchController.php b/module/VuFind/src/VuFind/Controller/SearchController.php index ef7a1826242477a55505437ed412506f667efa9e..5140a82dde76d1c619ea88072d589e29f3f7e9ee 100644 --- a/module/VuFind/src/VuFind/Controller/SearchController.php +++ b/module/VuFind/src/VuFind/Controller/SearchController.php @@ -257,7 +257,7 @@ class SearchController extends AbstractSearch // Loop through the history foreach ($searchHistory as $current) { - $minSO = unserialize($current->search_object); + $minSO = $current->getSearchObject(); // Saved searches if ($current->saved == 1) { diff --git a/module/VuFind/src/VuFind/Db/Row/Search.php b/module/VuFind/src/VuFind/Db/Row/Search.php index 7b203a0f318f5238a930900ce1254472ed5bf8b1..0f1fcaaeba7ec7de47cdfcc7649eb5ce9a87e129 100644 --- a/module/VuFind/src/VuFind/Db/Row/Search.php +++ b/module/VuFind/src/VuFind/Db/Row/Search.php @@ -48,4 +48,33 @@ class Search extends RowGateway { parent::__construct('id', 'search', $adapter); } + + /** + * Get the search object from the row + * + * @return \VuFind\Search\Minified + */ + public function getSearchObject() + { + // Resource check for PostgreSQL compatibility: + $raw = is_resource($this->search_object) + ? stream_get_contents($this->search_object) : $this->search_object; + return unserialize($raw); + } + + /** + * Save + * + * @return int + */ + public function save() + { + // Note that if we have a resource, we need to grab the contents before + // saving -- this is necessary for PostgreSQL compatibility although MySQL + // returns a plain string + $this->search_object = is_resource($this->search_object) + ? stream_get_contents($this->search_object) + : $this->search_object; + parent::save(); + } } diff --git a/module/VuFind/src/VuFind/Db/Table/Search.php b/module/VuFind/src/VuFind/Db/Table/Search.php index 18c28ec3a1fa02d895f2062d193b17939cebb7ae..bf6cb46b4f0dc2348018ec7d2536f94974a20b72 100644 --- a/module/VuFind/src/VuFind/Db/Table/Search.php +++ b/module/VuFind/src/VuFind/Db/Table/Search.php @@ -157,11 +157,7 @@ class Search extends Gateway // 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 = unserialize( - is_resource($oldSearch->search_object) - ? stream_get_contents($oldSearch->search_object) - : $oldSearch->search_object - ); + $minSO = $oldSearch->getSearchObject(); $dupSearch = $minSO->deminify($manager); // See if the classes and urls match $oldUrl = $dupSearch->getUrlQuery()->getParams(); diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/AbstractHandlerMap.php b/module/VuFindSearch/src/VuFindSearch/Backend/AbstractHandlerMap.php index 677b3c3a5f891039a6e976806cd3061970deff0b..417a22c05ae66210ad8dd3be5b622bb13135ac9e 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/AbstractHandlerMap.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/AbstractHandlerMap.php @@ -109,8 +109,9 @@ abstract class AbstractHandlerMap * * @return void */ - protected function apply(ParamBag $params, array $defaults, array $appends, array $invariants) - { + protected function apply(ParamBag $params, array $defaults, array $appends, + array $invariants + ) { $final = $params->getArrayCopy(); $final = array_replace($defaults, $final); $final = array_merge_recursive($final, $appends); diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Exception/HttpErrorException.php b/module/VuFindSearch/src/VuFindSearch/Backend/Exception/HttpErrorException.php index 821ce98fe2406cc38a2bcaae475bf776c1ac4fe0..6e03ffe92d81db97d0d2a7dee487172786d3926e 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Exception/HttpErrorException.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Exception/HttpErrorException.php @@ -66,9 +66,13 @@ abstract class HttpErrorException extends BackendException $status = $response->getStatusCode(); $phrase = $response->getReasonPhrase(); if ($status >= 500) { - return new RemoteErrorException($status . ' ' . $phrase, $status, $response); + return new RemoteErrorException( + $status . ' ' . $phrase, $status, $response + ); } else { - return new RequestErrorException($status . ' ' . $phrase, $status, $response); + return new RequestErrorException( + $status . ' ' . $phrase, $status, $response + ); } } @@ -82,8 +86,9 @@ abstract class HttpErrorException extends BackendException * * @return void */ - public function __construct($message, $code, Response $response, Exception $prev = null) - { + public function __construct($message, $code, Response $response, + Exception $prev = null + ) { parent::__construct($message, $code, $prev); $this->response = $response; }