X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Flocale%2Fsrc%2FForm%2FImportForm.php;fp=web%2Fcore%2Fmodules%2Flocale%2Fsrc%2FForm%2FImportForm.php;h=a9f15f07f18de6160e565e500965bfcf795cf126;hp=40a77204b47d373a52819a816429b8d55ee64840;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/locale/src/Form/ImportForm.php b/web/core/modules/locale/src/Form/ImportForm.php index 40a77204b..a9f15f07f 100644 --- a/web/core/modules/locale/src/Form/ImportForm.php +++ b/web/core/modules/locale/src/Form/ImportForm.php @@ -11,6 +11,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Form constructor for the translation import screen. + * + * @internal */ class ImportForm extends FormBase { @@ -108,6 +110,7 @@ class ImportForm extends FormBase { ], '#size' => 50, '#upload_validators' => $validators, + '#upload_location' => 'translations://', '#attributes' => ['class' => ['file-import-input']], ]; $form['langcode'] = [ @@ -154,7 +157,7 @@ class ImportForm extends FormBase { * {@inheritdoc} */ public function validateForm(array &$form, FormStateInterface $form_state) { - $this->file = file_save_upload('file', $form['file']['#upload_validators'], 'translations://', 0); + $this->file = _file_save_upload_from_form($form['file'], $form_state, 0); // Ensure we have the file uploaded. if (!$this->file) {