This commit is contained in:
Pierre Ardoin 2020-04-16 13:26:55 +02:00 committed by GitHub
parent e85b4a5a20
commit 19c85785f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,7 @@
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019-2020 Thibault FOUCART <support@ptibogxiv.net>
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
*
* 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
@ -2255,11 +2256,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete')
// Documents
$objectref = dol_sanitizeFileName($object->ref);
$relativepath = $comref.'/'.$objectref.'.pdf';
if ($conf->product->entity != $object->entity) {
$filedir = $conf->product->multidir_output[$object->entity].'/'.$objectref; //Check repertories of current entities
} else {
$filedir = $conf->product->dir_output.'/'.$objectref; //Check repertory of the current product
}
$filedir = $conf->product->multidir_output[$object->entity].'/'.$objectref; //Check repertories of current entities
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed = $usercanread;
$delallowed = $usercancreate;