From a6fd64eacdf28e82830c76a275136d2cb0deb5c9 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 13 Feb 2013 09:56:07 +1300 Subject: [PATCH] If no remote dir set for WebDAV, just use the index name by itself --- code/solr/Solr.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/solr/Solr.php b/code/solr/Solr.php index 42ffff4..33368da 100644 --- a/code/solr/Solr.php +++ b/code/solr/Solr.php @@ -154,7 +154,11 @@ class Solr_Configure extends BuildTask { echo "done\n"; } else { echo "Creating configuration..."; - $service->coreCreate($index, "$remote/$index"); + $instanceDir = $indexName; + if ($remote) { + $instanceDir = "$remote/$instanceDir"; + } + $service->coreCreate($indexName, $instanceDir); echo "done\n"; } } @@ -250,4 +254,4 @@ class Solr_Reindex extends BuildTask { foreach ($items as $item) { $index->add($item); $item->destroy(); } } -} \ No newline at end of file +}