Fix: use new method

This commit is contained in:
Regis Houssin
2013-04-12 10:26:52 +02:00
parent 85e09a953f
commit 9596134e47

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -664,10 +664,10 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
$hookmanager->initHooks(array('fileslib'));
$parameters=array('dest_file' => $dest_file, 'src_file' => $src_file, 'file_name' => $file_name, 'varfiles' => $varfiles, 'allowoverwrite' => $allowoverwrite);
$reshook=$hookmanager->executeHooks('moveUploadedFile', $parameters, $object);
$hookmanager->executeHooks('moveUploadedFile', $parameters, $object);
}
if (empty($reshook))
if (empty($hookmanager->resPrint))
{
// The file functions must be in OS filesystem encoding.
$src_file_osencoded=dol_osencode($src_file);
@@ -701,7 +701,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
}
}
else
return $reshook;
return $hookmanager->resPrint;
}
/**