Fix: Error management
This commit is contained in:
parent
ecb19e2225
commit
e19e0ff557
@ -117,7 +117,7 @@ if (file_exists($fullpathselecteddir))
|
||||
// Loop on all database entries (sqltree) to find the one matching the subdir found into dir to scan
|
||||
foreach($sqltree as $key => $tmpval)
|
||||
{
|
||||
//print "-- key=".$key." - ".$val['fullrelativename']." vs ".(($selecteddir != '/'?$selecteddir.'/':'').$file).'<br>';
|
||||
//print "-- key=".$key." - ".$tmpval['fullrelativename']." vs ".(($selecteddir != '/'?$selecteddir.'/':'').$file)."<br>\n";
|
||||
if ($tmpval['fullrelativename'] == (($selecteddir != '/'?$selecteddir.'/':'').$file)) // We found equivalent record into database
|
||||
{
|
||||
$val=$tmpval;
|
||||
|
||||
@ -142,7 +142,8 @@ class EcmDirectory // extends CommonObject
|
||||
|
||||
$dir=$conf->ecm->dir_output.'/'.$this->getRelativePath();
|
||||
$result=dol_mkdir($dir);
|
||||
|
||||
if ($result < 0) { $error++; $this->error="ErrorFailedToCreateDir"; }
|
||||
|
||||
// Appel des triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($this->db);
|
||||
|
||||
@ -118,6 +118,7 @@ if ($action == 'add' && $user->rights->ecm->setup)
|
||||
{
|
||||
$langs->load("errors");
|
||||
setEventMessage($langs->trans($ecmdir->error), 'errors');
|
||||
setEventMessage($ecmdir->errors, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user