Commit 8f2f40b4 authored by Théo GUILLON's avatar Théo GUILLON
Browse files

Correction : mauvais modele utilisé pour la transaction

parent d6794679
......@@ -45,20 +45,20 @@ class ModeleExtraitRegistresController extends AppController {
throw new ForbiddenException(__d('default', 'default.flasherrorPasDroitPage'));
}
$this->Modele->begin();
$this->ModeleExtraitRegistre->begin();
$saveFile = $this->ModeleExtraitRegistre->saveFile($this->request->data, $this->Session->read('Organisation.id'));
if ($saveFile == 0) {
$this->Modele->commit();
$this->ModeleExtraitRegistre->commit();
$this->Session->setFlash(__d('modele', 'modele.flashsuccessModeleEnregistrer'), 'flashsuccess');
} elseif ($saveFile == 1) {
$this->Modele->rollback();
$this->ModeleExtraitRegistre->rollback();
$this->Session->setFlash(__d('modele', 'modele.flasherrorFicherTropLourd'), 'flasherror');
} elseif ($saveFile == 2) {
$this->Modele->rollback();
$this->ModeleExtraitRegistre->rollback();
$this->Session->setFlash(__d('modele', 'modele.flasherrorExtensionNonValide'), 'flasherror');
} elseif ($saveFile == 3) {
$this->Modele->rollback();
$this->ModeleExtraitRegistre->rollback();
$this->Session->setFlash(__d('modele', 'modele.flashwarningAucunFichier'), 'flashwarning');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment