From 20e1b1cbc60ab84279932fb7abdf94f7245beaf6 Mon Sep 17 00:00:00 2001 From: BrewCurious Date: Wed, 25 Oct 2017 14:12:05 -0700 Subject: [PATCH 1/3] Adding extension hooks before and after Solr_Configure and Solr_Reindex tasks to allow (e.g. Translatable) to modify filters consistently across multiple task iterations --- code/solr/Solr.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/solr/Solr.php b/code/solr/Solr.php index 9921d27..b93d044 100644 --- a/code/solr/Solr.php +++ b/code/solr/Solr.php @@ -227,6 +227,8 @@ class Solr_Configure extends Solr_BuildTask { parent::run($request); + $this->extend('updateBeforeSolrConfigureTask', $request); + // Find the IndexStore handler, which will handle uploading config files to Solr $store = $this->getSolrConfigStore(); $indexes = Solr::get_indexes(); @@ -244,6 +246,8 @@ class Solr_Configure extends Solr_BuildTask if (isset($e)) { exit(1); } + + $this->extend('updateAfterSolrConfigureTask', $request); } /** @@ -346,10 +350,14 @@ class Solr_Reindex extends Solr_BuildTask { parent::run($request); + $this->extend('updateBeforeSolrReindexTask', $request); + // Reset state $originalState = SearchVariant::current_state(); $this->doReindex($request); SearchVariant::activate_state($originalState); + + $this->extend('updateAfterSolrReindexTask', $request); } /** From 0692e2adadb4187991d716e5e4569774ae1bb578 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 20 Nov 2017 14:28:48 +1300 Subject: [PATCH 2/3] Remove obsolete branch alias --- composer.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/composer.json b/composer.json index ab61056..57d12c0 100644 --- a/composer.json +++ b/composer.json @@ -27,11 +27,7 @@ "silverstripe/cms": "~3.1", "hafriedlander/silverstripe-phockito": "*" }, - "extra": { - "branch-alias": { - "2.x-dev": "2.4.x-dev" - } - }, + "extra": [], "suggest": { "silverstripe/fulltextsearch-localsolr": "Adds a ready-to-use local Solr server for initial development" }, From 196fc383fff9cd9e843ab835f91bb86156cb40d7 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 20 Nov 2017 14:29:16 +1300 Subject: [PATCH 3/3] Update branch alias for 2.5.x-dev --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ab61056..7109250 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ }, "extra": { "branch-alias": { - "2.x-dev": "2.4.x-dev" + "2.x-dev": "2.5.x-dev" } }, "suggest": {