105 $tabId = $this->request->get(
'tabId');
106 if (empty($tabId) || (
int)$tabId <= 0)
110 $this->tabId = (int)$tabId;
112 $this->
keepField([
'encodingIn',
'updateMethod',
'csvFilePath',
'languages']);
116 $this->languages = Translate\Config::getEnabledLanguages();
119 $enc = $this->request->get(
'encodingIn');
120 if ($enc !==
null && \in_array(\mb_strtolower($enc), Translate\Config::getAllowedEncodings()))
122 $this->encodingIn = \mb_strtolower($enc);
124 elseif (isset($params[
'encodingIn']) && \in_array($params[
'encodingIn'], Translate\Config::getAllowedEncodings()))
126 $this->encodingIn = $params[
'encodingIn'];
130 $updateMethod = $this->request->get(
'updateMethod');
131 if ($updateMethod !==
null)
133 if (\in_array($updateMethod, [self::METHOD_ADD_ONLY, self::METHOD_UPDATE_ONLY, self::METHOD_ADD_UPDATE]))
135 $this->updateMethod = $updateMethod;
138 if (empty($this->updateMethod) && isset($params[
'updateMethod']))
140 $this->updateMethod = $params[
'updateMethod'];
142 if (empty($this->updateMethod))
148 $reindex = $this->request->get(
'reindex');
149 $this->reindex = ($reindex ===
'Y');
152 if (isset($params[
'csvFilePath']))
154 $this->csvFilePath = $params[
'csvFilePath'];