collectI18nStatics() * * @param HTTPRequest $request */ public function run($request) { increase_time_limit_to(); $collector = i18nTextCollector::create($request->getVar('locale')); $merge = $this->getIsMerge($request); // Custom writer $writerName = $request->getVar('writer'); if ($writerName) { $writer = Injector::inst()->get($writerName); $collector->setWriter($writer); } // Get restrictions $restrictModules = ($request->getVar('module')) ? explode(',', $request->getVar('module')) : null; $collector->run($restrictModules, $merge); Debug::message(__CLASS__ . " completed!", false); } /** * Check if we should merge * * @param HTTPRequest $request * @return bool */ protected function getIsMerge($request) { $merge = $request->getVar('merge'); // Default to true if not given if (!isset($merge)) { return true; } // merge=0 or merge=false will disable merge return !in_array($merge, array('0', 'false')); } }