|
|
@@ -130,6 +130,7 @@ class document
|
|
|
|
|
|
public static function add()
|
|
|
{
|
|
|
+ session::setTemp(core::getPost(), "document");
|
|
|
$file = core::getFiles("document-import");
|
|
|
$md5 = md5_file($file["tmp_name"]);
|
|
|
if(file::findM5($md5) == TRUE){
|
|
|
@@ -150,6 +151,7 @@ class document
|
|
|
$lastId = db::lastInsertId();
|
|
|
} catch (Exception $ex) {
|
|
|
alert::recError("Erreur à l'enregistrement de la fiche : " . core::getPost("titre"));
|
|
|
+ if(core::isDebug()) { alert::recError("Stack : " . $ex); }
|
|
|
return FALSE;
|
|
|
}
|
|
|
|
|
|
@@ -157,6 +159,7 @@ class document
|
|
|
$idFile = self::uploadFile($file);
|
|
|
} catch (Exception $ex) {
|
|
|
alert::recError("Erreur à l'enregistrement de la pièce jointe : " . $idFile);
|
|
|
+ if(core::isDebug()) { alert::recError("Stack : " . $ex); }
|
|
|
return FALSE;
|
|
|
}
|
|
|
|
|
|
@@ -164,6 +167,7 @@ class document
|
|
|
self::addFile($lastId, $idFile);
|
|
|
} catch (Exception $ex) {
|
|
|
alert::recError("Erreur à l'enregistrement de la liaison : " . $idFile);
|
|
|
+ if(core::isDebug()) { alert::recError("Stack : " . $ex); }
|
|
|
return FALSE;
|
|
|
}
|
|
|
|
|
|
@@ -176,6 +180,7 @@ class document
|
|
|
|
|
|
} catch (Exception $ex) {
|
|
|
alert::recError("Erreur à l'enregistrement de la liaison : " . $idFile);
|
|
|
+ if(core::isDebug()) { alert::recError("Stack : " . $ex); }
|
|
|
return FALSE;
|
|
|
}
|
|
|
|