Permalink
Browse files

Uploading docx files is no longer authorized

  • Loading branch information...
lnprieto committed Jun 26, 2018
1 parent 7d2846d commit 6604180dade14bf0b63fc395d3718f3dc1dd027e
Showing with 3 additions and 3 deletions.
  1. +3 −3 lodel/src/lodel/edition/oochargement.php
@@ -196,7 +196,7 @@ function printErrors($errors, $exit = true, $isFrame = true)
{
foreach($extracted_files as $file)
{
if(in_array(strtolower(pathinfo($file, PATHINFO_EXTENSION)), array('doc', 'docx', 'sxw', 'odt', 'rtf')))
if(in_array(strtolower(pathinfo($file, PATHINFO_EXTENSION)), array('doc', 'sxw', 'odt', 'rtf')))
{
$tmp = tmpdir(uniqid('import_', true));
rename($oldtmpdir . DIRECTORY_SEPARATOR . $file, $tmp . DIRECTORY_SEPARATOR . $file);
@@ -281,9 +281,9 @@ function removefilesfromimport($rep)
die;
}
elseif(!in_array($ext, array('doc', 'docx', 'sxw', 'odt', 'rtf')))
elseif(!in_array($ext, array('doc', 'sxw', 'odt', 'rtf')))
{
printErrors('invalid file type for document <em>'.$sourceoriginale.'</em>, authorized are .doc, .docx, .sxw, .odt, .rtf', true, $isFrame);
printErrors('Invalid file type for document <em>'.$sourceoriginale.'</em>, authorized are .doc, .sxw, .odt, .rtf', true, $isFrame);
}
elseif(!empty($context['multiple']))
{

1 comment on commit 6604180

@bcenou

This comment has been minimized.

Contributor

bcenou commented on 6604180 Jun 28, 2018

Pourquoi ne pas avoir déplacé la liste des extensions autorisées dans lodelconfig ?
OTX devra accepter les docx dans un futur proche.

Please sign in to comment.