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

Don't waste time on recommendations in combined mode.

parent fca9a363
No related merge requests found
......@@ -210,7 +210,10 @@ class AbstractSearch extends AbstractBase
$results = $this->getResultsManager()->get($this->searchClassId);
$params = $results->getParams();
$params->recommendationsEnabled(true);
// Enable recommendations unless explicitly told to disable them:
$noRecommend = $this->params()->fromQuery('noRecommend', false);
$params->recommendationsEnabled(!$noRecommend);
// Send both GET and POST variables to search class:
$params->initFromRequest(
......
......@@ -210,5 +210,8 @@ class CombinedController extends AbstractSearch
// Apply limit setting, if any:
$query = $this->getRequest()->getQuery();
$query->limit = isset($settings['limit']) ? $settings['limit'] : null;
// Disable recommendations:
$query->noRecommend = 1;
}
}
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