FIX Warnings

Conflicts:
	htdocs/core/lib/files.lib.php
	htdocs/core/lib/images.lib.php
This commit is contained in:
Laurent Destailleur 2017-06-09 00:27:19 +02:00
parent ee8bc24348
commit a63050bf46
2 changed files with 35 additions and 25 deletions

View File

@ -67,9 +67,14 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
$path=preg_replace('/([\\/]+)$/i','',$path); $path=preg_replace('/([\\/]+)$/i','',$path);
$newpath=dol_osencode($path); $newpath=dol_osencode($path);
if (! $nohook) $reshook = 0;
$file_list = array();
if (is_object($hookmanager) && ! $nohook)
{ {
$hookmanager->initHooks(array('fileslib')); $hookmanager->resArray=array();
$hookmanager->initHooks(array('fileslib'));
$parameters=array( $parameters=array(
'path' => $newpath, 'path' => $newpath,
@ -202,6 +207,10 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
return array(); return array();
} }
} }
if (is_object($hookmanager) && is_array($hookmanager->resArray)) $file_list = array_merge($file_list, $hookmanager->resArray);
return $file_list;
} }

View File

@ -434,6 +434,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $
dol_mkdir($dirthumb); dol_mkdir($dirthumb);
// Initialisation des variables selon l'extension de l'image // Initialisation des variables selon l'extension de l'image
$img=null;
switch($infoImg[2]) switch($infoImg[2])
{ {
case IMAGETYPE_GIF: // 1 case IMAGETYPE_GIF: // 1