|
@@ -58,8 +58,8 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
|
|
|
if (! is_object($hookmanager))
|
|
|
{
|
|
|
if (! class_exists('HookManager')) {
|
|
|
- // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
|
|
- require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
|
|
+ // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
|
|
+ require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
|
|
$hookmanager=new HookManager($db);
|
|
|
}
|
|
|
}
|
|
@@ -82,7 +82,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
|
|
|
'sortorder' => $sortorder,
|
|
|
'loaddate' => $loaddate,
|
|
|
'loadsize' => $loadsize
|
|
|
- );
|
|
|
+ );
|
|
|
$reshook=$hookmanager->executeHooks('getNodesList', $parameters);
|
|
|
|
|
|
// $reshook may contain returns stacked by other modules
|
|
@@ -94,103 +94,103 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (! is_dir($newpath)) return array();
|
|
|
-
|
|
|
- if ($dir = opendir($newpath))
|
|
|
- {
|
|
|
- $filedate='';
|
|
|
- $filesize='';
|
|
|
- $file_list = array();
|
|
|
-
|
|
|
- while (false !== ($file = readdir($dir)))
|
|
|
- {
|
|
|
- if (! utf8_check($file)) $file=utf8_encode($file); // To be sure data is stored in utf8 in memory
|
|
|
-
|
|
|
- $qualified=1;
|
|
|
-
|
|
|
- // Define excludefilterarray
|
|
|
- $excludefilterarray=array('^\.');
|
|
|
- if (is_array($excludefilter))
|
|
|
- {
|
|
|
- $excludefilterarray=array_merge($excludefilterarray,$excludefilter);
|
|
|
- }
|
|
|
- else if ($excludefilter) $excludefilterarray[]=$excludefilter;
|
|
|
- // Check if file is qualified
|
|
|
- foreach($excludefilterarray as $filt)
|
|
|
- {
|
|
|
- if (preg_match('/'.$filt.'/i',$file)) {
|
|
|
- $qualified=0; break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if ($qualified)
|
|
|
- {
|
|
|
- $isdir=is_dir(dol_osencode($path."/".$file));
|
|
|
- // Check whether this is a file or directory and whether we're interested in that type
|
|
|
- if ($isdir && (($types=="directories") || ($types=="all") || $recursive))
|
|
|
- {
|
|
|
- // Add entry into file_list array
|
|
|
- if (($types=="directories") || ($types=="all"))
|
|
|
- {
|
|
|
- if ($loaddate || $sortcriteria == 'date') $filedate=dol_filemtime($path."/".$file);
|
|
|
- if ($loadsize || $sortcriteria == 'size') $filesize=dol_filesize($path."/".$file);
|
|
|
-
|
|
|
- if (! $filter || preg_match('/'.$filter.'/i',$path.'/'.$file))
|
|
|
- {
|
|
|
- $file_list[] = array(
|
|
|
- "name" => $file,
|
|
|
- "fullname" => $path.'/'.$file,
|
|
|
- "date" => $filedate,
|
|
|
- "size" => $filesize,
|
|
|
- "type" => 'dir'
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // if we're in a directory and we want recursive behavior, call this function again
|
|
|
- if ($recursive)
|
|
|
- {
|
|
|
- $file_list = array_merge($file_list,dol_dir_list($path."/".$file, $types, $recursive, $filter, $excludefilter, $sortcriteria, $sortorder, $mode));
|
|
|
- }
|
|
|
- }
|
|
|
- else if (! $isdir && (($types == "files") || ($types == "all")))
|
|
|
- {
|
|
|
- // Add file into file_list array
|
|
|
- if ($loaddate || $sortcriteria == 'date') $filedate=dol_filemtime($path."/".$file);
|
|
|
- if ($loadsize || $sortcriteria == 'size') $filesize=dol_filesize($path."/".$file);
|
|
|
-
|
|
|
- if (! $filter || preg_match('/'.$filter.'/i',$path.'/'.$file))
|
|
|
- {
|
|
|
- $file_list[] = array(
|
|
|
- "name" => $file,
|
|
|
- "fullname" => $path.'/'.$file,
|
|
|
- "date" => $filedate,
|
|
|
- "size" => $filesize,
|
|
|
- "type" => 'file'
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- closedir($dir);
|
|
|
-
|
|
|
- // Obtain a list of columns
|
|
|
- if (! empty($sortcriteria))
|
|
|
- {
|
|
|
- $myarray=array();
|
|
|
- foreach ($file_list as $key => $row)
|
|
|
- {
|
|
|
- $myarray[$key] = (isset($row[$sortcriteria])?$row[$sortcriteria]:'');
|
|
|
- }
|
|
|
- // Sort the data
|
|
|
- if ($sortorder) array_multisort($myarray, $sortorder, $file_list);
|
|
|
- }
|
|
|
-
|
|
|
- return $file_list;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return array();
|
|
|
+ if (! is_dir($newpath)) return array();
|
|
|
+
|
|
|
+ if ($dir = opendir($newpath))
|
|
|
+ {
|
|
|
+ $filedate='';
|
|
|
+ $filesize='';
|
|
|
+ $file_list = array();
|
|
|
+
|
|
|
+ while (false !== ($file = readdir($dir)))
|
|
|
+ {
|
|
|
+ if (! utf8_check($file)) $file=utf8_encode($file); // To be sure data is stored in utf8 in memory
|
|
|
+
|
|
|
+ $qualified=1;
|
|
|
+
|
|
|
+ // Define excludefilterarray
|
|
|
+ $excludefilterarray=array('^\.');
|
|
|
+ if (is_array($excludefilter))
|
|
|
+ {
|
|
|
+ $excludefilterarray=array_merge($excludefilterarray,$excludefilter);
|
|
|
+ }
|
|
|
+ else if ($excludefilter) $excludefilterarray[]=$excludefilter;
|
|
|
+ // Check if file is qualified
|
|
|
+ foreach($excludefilterarray as $filt)
|
|
|
+ {
|
|
|
+ if (preg_match('/'.$filt.'/i',$file)) {
|
|
|
+ $qualified=0; break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($qualified)
|
|
|
+ {
|
|
|
+ $isdir=is_dir(dol_osencode($path."/".$file));
|
|
|
+ // Check whether this is a file or directory and whether we're interested in that type
|
|
|
+ if ($isdir && (($types=="directories") || ($types=="all") || $recursive))
|
|
|
+ {
|
|
|
+ // Add entry into file_list array
|
|
|
+ if (($types=="directories") || ($types=="all"))
|
|
|
+ {
|
|
|
+ if ($loaddate || $sortcriteria == 'date') $filedate=dol_filemtime($path."/".$file);
|
|
|
+ if ($loadsize || $sortcriteria == 'size') $filesize=dol_filesize($path."/".$file);
|
|
|
+
|
|
|
+ if (! $filter || preg_match('/'.$filter.'/i',$path.'/'.$file))
|
|
|
+ {
|
|
|
+ $file_list[] = array(
|
|
|
+ "name" => $file,
|
|
|
+ "fullname" => $path.'/'.$file,
|
|
|
+ "date" => $filedate,
|
|
|
+ "size" => $filesize,
|
|
|
+ "type" => 'dir'
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // if we're in a directory and we want recursive behavior, call this function again
|
|
|
+ if ($recursive)
|
|
|
+ {
|
|
|
+ $file_list = array_merge($file_list,dol_dir_list($path."/".$file, $types, $recursive, $filter, $excludefilter, $sortcriteria, $sortorder, $mode));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (! $isdir && (($types == "files") || ($types == "all")))
|
|
|
+ {
|
|
|
+ // Add file into file_list array
|
|
|
+ if ($loaddate || $sortcriteria == 'date') $filedate=dol_filemtime($path."/".$file);
|
|
|
+ if ($loadsize || $sortcriteria == 'size') $filesize=dol_filesize($path."/".$file);
|
|
|
+
|
|
|
+ if (! $filter || preg_match('/'.$filter.'/i',$path.'/'.$file))
|
|
|
+ {
|
|
|
+ $file_list[] = array(
|
|
|
+ "name" => $file,
|
|
|
+ "fullname" => $path.'/'.$file,
|
|
|
+ "date" => $filedate,
|
|
|
+ "size" => $filesize,
|
|
|
+ "type" => 'file'
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ closedir($dir);
|
|
|
+
|
|
|
+ // Obtain a list of columns
|
|
|
+ if (! empty($sortcriteria))
|
|
|
+ {
|
|
|
+ $myarray=array();
|
|
|
+ foreach ($file_list as $key => $row)
|
|
|
+ {
|
|
|
+ $myarray[$key] = (isset($row[$sortcriteria])?$row[$sortcriteria]:'');
|
|
|
+ }
|
|
|
+ // Sort the data
|
|
|
+ if ($sortorder) array_multisort($myarray, $sortorder, $file_list);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $file_list;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return array();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -554,43 +554,43 @@ function dol_unescapefile($filename)
|
|
|
return trim(basename($filename), ".\x00..\x20");
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * Make control on an uploaded file from an GUI page and move it to final destination.
|
|
|
- * If there is errors (virus found, antivir in error, bad filename), file is not moved.
|
|
|
+/**
|
|
|
+ * Make control on an uploaded file from an GUI page and move it to final destination.
|
|
|
+ * If there is errors (virus found, antivir in error, bad filename), file is not moved.
|
|
|
* Note: This function can be used only into a HTML page context. Use dol_move if you are outside.
|
|
|
- *
|
|
|
- * @param string $src_file Source full path filename ($_FILES['field']['tmp_name'])
|
|
|
- * @param string $dest_file Target full path filename ($_FILES['field']['name'])
|
|
|
- * @param int $allowoverwrite 1=Overwrite target file if it already exists
|
|
|
- * @param int $disablevirusscan 1=Disable virus scan
|
|
|
- * @param string $uploaderrorcode Value of PHP upload error code ($_FILES['field']['error'])
|
|
|
+ *
|
|
|
+ * @param string $src_file Source full path filename ($_FILES['field']['tmp_name'])
|
|
|
+ * @param string $dest_file Target full path filename ($_FILES['field']['name'])
|
|
|
+ * @param int $allowoverwrite 1=Overwrite target file if it already exists
|
|
|
+ * @param int $disablevirusscan 1=Disable virus scan
|
|
|
+ * @param string $uploaderrorcode Value of PHP upload error code ($_FILES['field']['error'])
|
|
|
* @param int $notrigger Disable all triggers
|
|
|
- * @param string $varfiles _FILES var name
|
|
|
+ * @param string $varfiles _FILES var name
|
|
|
* @return int >0 if OK, <0 or string if KO
|
|
|
- * @see dolCheckUploadedFile, dol_move
|
|
|
- */
|
|
|
-function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $notrigger=0, $varfiles='addedfile')
|
|
|
-{
|
|
|
+ * @see dolCheckUploadedFile, dol_move
|
|
|
+ */
|
|
|
+function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $notrigger=0, $varfiles='addedfile')
|
|
|
+{
|
|
|
global $db, $hookmanager;
|
|
|
- global $object;
|
|
|
-
|
|
|
- $error=0;
|
|
|
-
|
|
|
- // Check uploaded file
|
|
|
- $dest_file=dolCheckUploadedFile($src_file, $dest_file, $disablevirusscan, $uploaderrorcode);
|
|
|
+ global $object;
|
|
|
+
|
|
|
+ $error=0;
|
|
|
+
|
|
|
+ // Check uploaded file
|
|
|
+ $dest_file=dolCheckUploadedFile($src_file, $dest_file, $disablevirusscan, $uploaderrorcode);
|
|
|
if (is_array($dest_file) && isset($dest_file['error'])) return $dest_file['error'];
|
|
|
|
|
|
- if (! is_object($hookmanager))
|
|
|
- {
|
|
|
- if (! class_exists('HookManager')) {
|
|
|
- // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
|
|
- require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
|
|
- $hookmanager=new HookManager($db);
|
|
|
- }
|
|
|
- }
|
|
|
- $hookmanager->initHooks(array('fileslib'));
|
|
|
-
|
|
|
- $parameters=array('dest_file' => $dest_file, 'varfiles' => $varfiles, 'allowoverwrite' => $allowoverwrite, 'notrigger' => $notrigger);
|
|
|
+ if (! is_object($hookmanager))
|
|
|
+ {
|
|
|
+ if (! class_exists('HookManager')) {
|
|
|
+ // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
|
|
+ require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
|
|
+ $hookmanager=new HookManager($db);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $hookmanager->initHooks(array('fileslib'));
|
|
|
+
|
|
|
+ $parameters=array('dest_file' => $dest_file, 'varfiles' => $varfiles, 'allowoverwrite' => $allowoverwrite, 'notrigger' => $notrigger);
|
|
|
$reshook=$hookmanager->executeHooks('dolMoveUploadedFile', $parameters, $object);
|
|
|
|
|
|
if (empty($reshook)) {
|
|
@@ -598,92 +598,92 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * Check an uploaded file.
|
|
|
- * If there is errors (virus found, antivir in error, bad filename), file is not moved.
|
|
|
- *
|
|
|
- * @param string $src_file Source full path filename ($_FILES['field']['tmp_name'])
|
|
|
- * @param string $dest_file Target full path filename ($_FILES['field']['name'])
|
|
|
- * @param int $disablevirusscan 1=Disable virus scan
|
|
|
- * @param string $uploaderrorcode Value of PHP upload error code ($_FILES['field']['error'])
|
|
|
+/**
|
|
|
+ * Check an uploaded file.
|
|
|
+ * If there is errors (virus found, antivir in error, bad filename), file is not moved.
|
|
|
+ *
|
|
|
+ * @param string $src_file Source full path filename ($_FILES['field']['tmp_name'])
|
|
|
+ * @param string $dest_file Target full path filename ($_FILES['field']['name'])
|
|
|
+ * @param int $disablevirusscan 1=Disable virus scan
|
|
|
+ * @param string $uploaderrorcode Value of PHP upload error code ($_FILES['field']['error'])
|
|
|
* @return int >0 if OK, <0 or string if KO
|
|
|
- * @see dol_move_uploaded_file
|
|
|
- */
|
|
|
-function dolCheckUploadedFile($src_file, $dest_file, $disablevirusscan=0, $uploaderrorcode=0)
|
|
|
-{
|
|
|
- global $conf;
|
|
|
-
|
|
|
- $file_name = $dest_file;
|
|
|
- // If an upload error has been reported
|
|
|
- if ($uploaderrorcode)
|
|
|
- {
|
|
|
- switch($uploaderrorcode)
|
|
|
- {
|
|
|
- case UPLOAD_ERR_INI_SIZE: // 1
|
|
|
- return array('error' => 'ErrorFileSizeTooLarge');
|
|
|
- break;
|
|
|
- case UPLOAD_ERR_FORM_SIZE: // 2
|
|
|
- return array('error' => 'ErrorFileSizeTooLarge');
|
|
|
- break;
|
|
|
- case UPLOAD_ERR_PARTIAL: // 3
|
|
|
- return array('error' => 'ErrorPartialFile');
|
|
|
- break;
|
|
|
- case UPLOAD_ERR_NO_TMP_DIR: //
|
|
|
- return array('error' => 'ErrorNoTmpDir');
|
|
|
- break;
|
|
|
- case UPLOAD_ERR_CANT_WRITE:
|
|
|
- return array('error' => 'ErrorFailedToWriteInDir');
|
|
|
- break;
|
|
|
- case UPLOAD_ERR_EXTENSION:
|
|
|
- return array('error' => 'ErrorUploadBlockedByAddon');
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // If we need to make a virus scan
|
|
|
- if (empty($disablevirusscan) && file_exists($src_file) && ! empty($conf->global->MAIN_ANTIVIRUS_COMMAND))
|
|
|
- {
|
|
|
- if (! class_exists('AntiVir')) {
|
|
|
- require DOL_DOCUMENT_ROOT.'/core/class/antivir.class.php';
|
|
|
- }
|
|
|
- $antivir=new AntiVir($db);
|
|
|
- $result = $antivir->dol_avscan_file($src_file);
|
|
|
- if ($result < 0) // If virus or error, we stop here
|
|
|
- {
|
|
|
- $reterrors=$antivir->errors;
|
|
|
- dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$file_name.'") KO with antivirus: result='.$result.' errors='.join(',',$antivir->errors), LOG_WARNING);
|
|
|
- return array('error' => 'ErrorFileIsInfectedWithAVirus: '.join(',',$reterrors));
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // Security:
|
|
|
- // Disallow file with some extensions. We renamed them.
|
|
|
- // Car si on a mis le rep documents dans un rep de la racine web (pas bien), cela permet d'executer du code a la demande.
|
|
|
- if (preg_match('/\.htm|\.html|\.php|\.pl|\.cgi$/i',$file_name))
|
|
|
- {
|
|
|
- $file_name.= '.noexe';
|
|
|
- }
|
|
|
-
|
|
|
- // Security:
|
|
|
- // On interdit fichiers caches, remontees de repertoire ainsi que les pipes dans les noms de fichiers.
|
|
|
- if (preg_match('/^\./',$src_file) || preg_match('/\.\./',$src_file) || preg_match('/[<>|]/',$src_file))
|
|
|
- {
|
|
|
- dol_syslog("Refused to deliver file ".$src_file, LOG_WARNING);
|
|
|
- return array('error' => -1);
|
|
|
- }
|
|
|
-
|
|
|
- // Security:
|
|
|
- // On interdit fichiers caches, remontees de repertoire ainsi que les pipe dans
|
|
|
- // les noms de fichiers.
|
|
|
- if (preg_match('/^\./',$dest_file) || preg_match('/\.\./',$dest_file) || preg_match('/[<>|]/',$dest_file))
|
|
|
- {
|
|
|
- dol_syslog("Refused to deliver file ".$dest_file, LOG_WARNING);
|
|
|
- return array('error' => -2);
|
|
|
- }
|
|
|
-
|
|
|
- return $file_name;
|
|
|
+ * @see dol_move_uploaded_file
|
|
|
+ */
|
|
|
+function dolCheckUploadedFile($src_file, $dest_file, $disablevirusscan=0, $uploaderrorcode=0)
|
|
|
+{
|
|
|
+ global $conf;
|
|
|
+
|
|
|
+ $file_name = $dest_file;
|
|
|
+ // If an upload error has been reported
|
|
|
+ if ($uploaderrorcode)
|
|
|
+ {
|
|
|
+ switch($uploaderrorcode)
|
|
|
+ {
|
|
|
+ case UPLOAD_ERR_INI_SIZE: // 1
|
|
|
+ return array('error' => 'ErrorFileSizeTooLarge');
|
|
|
+ break;
|
|
|
+ case UPLOAD_ERR_FORM_SIZE: // 2
|
|
|
+ return array('error' => 'ErrorFileSizeTooLarge');
|
|
|
+ break;
|
|
|
+ case UPLOAD_ERR_PARTIAL: // 3
|
|
|
+ return array('error' => 'ErrorPartialFile');
|
|
|
+ break;
|
|
|
+ case UPLOAD_ERR_NO_TMP_DIR: //
|
|
|
+ return array('error' => 'ErrorNoTmpDir');
|
|
|
+ break;
|
|
|
+ case UPLOAD_ERR_CANT_WRITE:
|
|
|
+ return array('error' => 'ErrorFailedToWriteInDir');
|
|
|
+ break;
|
|
|
+ case UPLOAD_ERR_EXTENSION:
|
|
|
+ return array('error' => 'ErrorUploadBlockedByAddon');
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // If we need to make a virus scan
|
|
|
+ if (empty($disablevirusscan) && file_exists($src_file) && ! empty($conf->global->MAIN_ANTIVIRUS_COMMAND))
|
|
|
+ {
|
|
|
+ if (! class_exists('AntiVir')) {
|
|
|
+ require DOL_DOCUMENT_ROOT.'/core/class/antivir.class.php';
|
|
|
+ }
|
|
|
+ $antivir=new AntiVir($db);
|
|
|
+ $result = $antivir->dol_avscan_file($src_file);
|
|
|
+ if ($result < 0) // If virus or error, we stop here
|
|
|
+ {
|
|
|
+ $reterrors=$antivir->errors;
|
|
|
+ dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$file_name.'") KO with antivirus: result='.$result.' errors='.join(',',$antivir->errors), LOG_WARNING);
|
|
|
+ return array('error' => 'ErrorFileIsInfectedWithAVirus: '.join(',',$reterrors));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // Security:
|
|
|
+ // Disallow file with some extensions. We renamed them.
|
|
|
+ // Car si on a mis le rep documents dans un rep de la racine web (pas bien), cela permet d'executer du code a la demande.
|
|
|
+ if (preg_match('/\.htm|\.html|\.php|\.pl|\.cgi$/i',$file_name))
|
|
|
+ {
|
|
|
+ $file_name.= '.noexe';
|
|
|
+ }
|
|
|
+
|
|
|
+ // Security:
|
|
|
+ // On interdit fichiers caches, remontees de repertoire ainsi que les pipes dans les noms de fichiers.
|
|
|
+ if (preg_match('/^\./',$src_file) || preg_match('/\.\./',$src_file) || preg_match('/[<>|]/',$src_file))
|
|
|
+ {
|
|
|
+ dol_syslog("Refused to deliver file ".$src_file, LOG_WARNING);
|
|
|
+ return array('error' => -1);
|
|
|
+ }
|
|
|
+
|
|
|
+ // Security:
|
|
|
+ // On interdit fichiers caches, remontees de repertoire ainsi que les pipe dans
|
|
|
+ // les noms de fichiers.
|
|
|
+ if (preg_match('/^\./',$dest_file) || preg_match('/\.\./',$dest_file) || preg_match('/[<>|]/',$dest_file))
|
|
|
+ {
|
|
|
+ dol_syslog("Refused to deliver file ".$dest_file, LOG_WARNING);
|
|
|
+ return array('error' => -2);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $file_name;
|
|
|
}
|
|
|
|
|
|
/**
|