mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v21
This commit is contained in:
parent
acc8338927
commit
2b5295497b
|
|
@ -1013,9 +1013,17 @@ class EcmFiles extends CommonObject
|
|||
} elseif ($option == 'commande_fournisseur') {
|
||||
$tmppath = preg_replace('/^fournisseur\/commande\//', '', $this->filepath);
|
||||
} else {
|
||||
$tmppath = preg_replace('/^[^\/]+\//', '', $this->filepath);
|
||||
if ((int) $this->entity > 1) {
|
||||
// Remove the part "entityid/commande/" into "entityid/commande/REFXXX" to get only the ref
|
||||
$tmppath = preg_replace('/^\d+\/[^\/]+\//', '', $this->filepath);
|
||||
} else {
|
||||
// Remove the part "commande/" into "commande/REFXXX" to get only the ref
|
||||
$tmppath = preg_replace('/^[^\/]+\//', '', $this->filepath);
|
||||
}
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/document.php?modulepart='.urlencode($option).'&file='.urlencode($tmppath.'/'.$this->filename).'&entity='.$this->entity;
|
||||
//var_dump($this->filepath);
|
||||
|
||||
$url = DOL_URL_ROOT.'/document.php?modulepart='.urlencode($option).'&file='.urlencode($tmppath.'/'.$this->filename).'&entity='.((int) $this->entity);
|
||||
} else {
|
||||
$url = DOL_URL_ROOT.'/ecm/file_card.php?id='.$this->id;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user