Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

Bug fix: argument value doesn't get passed to a view #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion views/searchlight_handler_argument_search.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ class searchlight_handler_argument_search extends views_handler_argument {
* Override of query().
*/
function query() {
$value = $this->get_value();
if (!empty($this->query->searchlight)) {
$value = is_array($this->value) ? reset($this->value) : $this->value;
$value = is_array($value) ? reset($value) : $value;
$value = trim($value);
if ($this->argument_validated && !empty($value)) {
$this->query->set_search_buildmode('search');
$this->query->set_search_options($this->options);
$this->query->set_search_query($value);
}
Expand Down