Fix: Error management

This commit is contained in:
Laurent Destailleur 2013-04-22 00:57:56 +02:00
parent ecb19e2225
commit e19e0ff557
3 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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';
}
}