Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/public/payment/paymentok.php
	htdocs/public/paypal/paymentok.php
This commit is contained in:
Laurent Destailleur
2018-03-08 16:37:17 +01:00
14 changed files with 44 additions and 21 deletions

View File

@@ -297,16 +297,32 @@ function dol_dir_list_in_database($path, $filter="", $excludefilter=null, $sortc
* Complete $filearray with data from database.
* This will call doldir_list_indatabase to complate filearray.
*
* @param array $filearray Array of files get using dol_dir_list
* @param array $filearray Array of files get using dol_dir_list
* @param string $relativedir Relative dir from DOL_DATA_ROOT
* @return void
*/
function completeFileArrayWithDatabaseInfo(&$filearray, $relativedir)
{
global $db, $user;
global $conf, $db, $user;
$filearrayindatabase = dol_dir_list_in_database($relativedir, '', null, 'name', SORT_ASC);
// TODO Remove this when PRODUCT_USE_OLD_PATH_FOR_PHOTO will be removed
global $modulepart;
if ($modulepart == 'produit' && ! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) {
global $object;
if (! empty($object->id))
{
if (! empty($conf->product->enabled)) $upload_dirold = $conf->product->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2),1,1).'/'.substr(substr("000".$object->id, -2),0,1).'/'.$object->id."/photos";
else $upload_dirold = $conf->service->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2),1,1).'/'.substr(substr("000".$object->id, -2),0,1).'/'.$object->id."/photos";
$relativedirold = preg_replace('/^'.preg_quote(DOL_DATA_ROOT,'/').'/', '', $upload_dirold);
$relativedirold = preg_replace('/^[\\/]/','',$relativedirold);
$filearrayindatabase = array_merge($filearrayindatabase, dol_dir_list_in_database($relativedirold, '', null, 'name', SORT_ASC));
}
}
//var_dump($filearray);
//var_dump($filearrayindatabase);