mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 12:05:29 +00:00
FIX Use ModuleLoader to resolve the path to cli-script.php in framework
This commit is contained in:
parent
216613d746
commit
992bb5a969
@ -4,6 +4,7 @@ namespace SilverStripe\FullTextSearch\Solr\Reindex\Handlers;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use SilverStripe\Control\Director;
|
||||
use SilverStripe\Core\Manifest\ModuleLoader;
|
||||
use SilverStripe\FullTextSearch\Solr\Solr;
|
||||
use SilverStripe\FullTextSearch\Solr\SolrIndex;
|
||||
use SilverStripe\ORM\DB;
|
||||
@ -71,7 +72,8 @@ class SolrReindexImmediateHandler extends SolrReindexBase
|
||||
$indexClass = get_class($indexInstance);
|
||||
$indexClassEscaped = addslashes($indexClass);
|
||||
$class = addslashes($class);
|
||||
$scriptPath = sprintf("%s%sframework%scli-script.php", BASE_PATH, DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR);
|
||||
$frameworkPath = ModuleLoader::getModule('silverstripe/framework')->getPath();
|
||||
$scriptPath = sprintf("%s%scli-script.php", $frameworkPath, DIRECTORY_SEPARATOR);
|
||||
$scriptTask = "php {$scriptPath} dev/tasks/{$taskName}";
|
||||
|
||||
$cmd = "{$scriptTask} index={$indexClassEscaped} class={$class} group={$group} groups={$groups} variantstate={$statevar}";
|
||||
|
Loading…
x
Reference in New Issue
Block a user