Merge branch 'MDL-60346-m33' of https://github.com/sammarshallou/moodle into MOODLE_33_STABLE
This commit is contained in:
@@ -1144,6 +1144,7 @@ class engine extends \core_search\engine {
|
||||
* @return \SolrClient
|
||||
*/
|
||||
protected function get_search_client($triggerexception = true) {
|
||||
global $CFG;
|
||||
|
||||
// Type comparison as it is set to false if not available.
|
||||
if ($this->client !== null) {
|
||||
@@ -1165,6 +1166,11 @@ class engine extends \core_search\engine {
|
||||
'timeout' => !empty($this->config->server_timeout) ? $this->config->server_timeout : '30'
|
||||
);
|
||||
|
||||
if ($CFG->proxyhost && !is_proxybypass('http://' . $this->config->server_hostname . '/')) {
|
||||
$options['proxy_host'] = $CFG->proxyhost;
|
||||
$options['proxy_port'] = $CFG->proxyport;
|
||||
}
|
||||
|
||||
if (!class_exists('\SolrClient')) {
|
||||
throw new \core_search\engine_exception('enginenotinstalled', 'search', '', 'solr');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user