45 public function run($path =
'')
49 $path = Translate\Config::getDefaultPath();
52 if (\preg_match(
"#(.+\/lang)(\/?\w*)#", $path, $matches))
57 $path =
'/'. \trim($path,
'/.\\');
59 if ($this->isNewProcess)
61 Index\Internals\PhraseFts::checkTables();
63 $languages = $this->controller->getRequest()->get(
'languages');
64 if (\is_array($languages) && !\in_array(
'all', $languages))
66 $languages = \array_intersect($languages, Translate\Config::getEnabledLanguages());
67 if (!empty($languages))
69 $this->languages = $languages;
74 if (!empty($this->languages))
76 $filter->langId = $this->languages;
84 $this->isNewProcess =
false;
90 if (isset($progressParams[
'totalItems']) && (
int)$progressParams[
'totalItems'] > 0)
92 $this->totalItems = (int)$progressParams[
'totalItems'];
93 $this->processedItems = (int)$progressParams[
'processedItems'];
96 if (isset($progressParams[
'seekPathId']))
98 $this->seekPathId = $progressParams[
'seekPathId'];
102 return $this->
performStep(
'runIndexing', [
'path' => $path]);