Justificativedoc validation
This commit is contained in:
parent
804f7f3e1e
commit
73806d6a3a
@ -584,8 +584,8 @@ class MyObject extends CommonObject
|
||||
// We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments
|
||||
$oldref = dol_sanitizeFileName($this->ref);
|
||||
$newref = dol_sanitizeFileName($num);
|
||||
$dirsource = $conf->myobject->dir_output.'/'.$oldref;
|
||||
$dirdest = $conf->myobject->dir_output.'/'.$newref;
|
||||
$dirsource = $conf->mymodule->dir_output.'/myobject/'.$oldref;
|
||||
$dirdest = $conf->mymodule->dir_output.'/myobject/'.$newref;
|
||||
if (!$error && file_exists($dirsource))
|
||||
{
|
||||
dol_syslog(get_class($this)."::validate() rename dir ".$dirsource." into ".$dirdest);
|
||||
@ -594,7 +594,7 @@ class MyObject extends CommonObject
|
||||
{
|
||||
dol_syslog("Rename ok");
|
||||
// Rename docs starting with $oldref with $newref
|
||||
$listoffiles = dol_dir_list($conf->myobject->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/'));
|
||||
$listoffiles = dol_dir_list($conf->mymodule->dir_output.'/myobject/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/'));
|
||||
foreach ($listoffiles as $fileentry)
|
||||
{
|
||||
$dirsource = $fileentry['name'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user