mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
FIX Only use values that are not empty
Previously the isset check would still allow falsey values.
This commit is contained in:
parent
b3f21a5ef2
commit
83af73c9f6
@ -13,7 +13,7 @@ class SolrConfigStore_File implements SolrConfigStore
|
||||
public function __construct($config)
|
||||
{
|
||||
$this->local = $config['path'];
|
||||
$this->remote = isset($config['remotepath']) ? $config['remotepath'] : $config['path'];
|
||||
$this->remote = !empty($config['remotepath']) ? $config['remotepath'] : $config['path'];
|
||||
}
|
||||
|
||||
public function getTargetDir($index)
|
||||
|
@ -26,12 +26,12 @@ class SolrConfigStore_Post implements SolrConfigStore
|
||||
|
||||
$this->url = implode('', [
|
||||
'http://',
|
||||
isset($config['auth']) ? $config['auth'] . '@' : '',
|
||||
!empty($config['auth']) ? $config['auth'] . '@' : '',
|
||||
$options['host'] . ':' . $options['port'],
|
||||
$config['path']
|
||||
]);
|
||||
|
||||
if (isset($config['remotepath'])) {
|
||||
if (!empty($config['remotepath'])) {
|
||||
$this->remote = $config['remotepath'];
|
||||
}
|
||||
}
|
||||
|
@ -18,11 +18,14 @@ class SolrConfigStore_WebDAV implements SolrConfigStore
|
||||
|
||||
$this->url = implode('', array(
|
||||
'http://',
|
||||
isset($config['auth']) ? $config['auth'] . '@' : '',
|
||||
$options['host'] . ':' . (isset($config['port']) ? $config['port'] : $options['port']),
|
||||
!empty($config['auth']) ? $config['auth'] . '@' : '',
|
||||
$options['host'] . ':' . (!empty($config['port']) ? $config['port'] : $options['port']),
|
||||
$config['path']
|
||||
));
|
||||
$this->remote = $config['remotepath'];
|
||||
|
||||
if (!empty($config['remotepath'])) {
|
||||
$this->remote = $config['remotepath'];
|
||||
}
|
||||
}
|
||||
|
||||
public function getTargetDir($index)
|
||||
|
Loading…
Reference in New Issue
Block a user