Error al importar plantilla desde Windows con caracteres especiales en Prestashop 1.7.0.3

Bug en Prestashop 1.7.0.3 al importar una plantilla desde Windows que contenga nombre con caracteres especiales como por ejemplo «espacios».

Bug reparado por aleeks en github

 Fichero:

[sourcecode language=»text»]
controllers/admin/AdminThemesController.php
[/sourcecode]

Sustituir las siguientes líneas:
[sourcecode language=»php»]
if ($this->processUploadFile($path)) {
$this->theme_manager->install($path);
@unlink($path);
[/sourcecode]

por

[sourcecode language=»php»]
$destination = $this->processUploadFile($path);
if (!empty($destination)) {
$this->theme_manager->install($destination);
@unlink($destination);
[/sourcecode]

Sustituir línea

[sourcecode language=»php»]

if (‘application/zip’ !== $_FILES[‘themearchive’][‘type’]) {

[/sourcecode]

por

[sourcecode language=»php»]

$tmp_name = $_FILES[‘themearchive’][‘tmp_name’];
if (‘application/zip’ !== mime_content_type($tmp_name)) {
[/sourcecode]

Sustituir línea

[sourcecode language=»php»]

_PS_ALL_THEMES_DIR_.$name

[/sourcecode]

por
[sourcecode language=»php»]

$dest

[/sourcecode]

Sustituir línea

[sourcecode language=»php»]

return true;

[/sourcecode]

por 

[sourcecode language=»php»]

return $dest;

[/sourcecode]

——

Bug al importar plantillas en Prestashop 1.7.0.3
Bug al importar plantillas en Prestashop 1.7.0.3

Documento probado en la versión 1.7.0.3 de Prestashop 1.7