From 7d3686e69d44ee4c3a6261b8fbd058255a9daf47 Mon Sep 17 00:00:00 2001
From: Sofian pujo <sofian.pujo@veremes.com>
Date: Wed, 14 Nov 2018 14:24:59 +0100
Subject: [PATCH] =?UTF-8?q?Ajout=20du=20sendMail=20si=20le=20contr=C3=B4le?=
 =?UTF-8?q?=20=C3=A9choue?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../ws/Extraction_depots.class.inc            |  1 -
 .../web_service/ws/Extractions.class.inc      | 22 +------------------
 2 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/src/module_extraction/web_service/ws/Extraction_depots.class.inc b/src/module_extraction/web_service/ws/Extraction_depots.class.inc
index cd39173e..e424f2ce 100755
--- a/src/module_extraction/web_service/ws/Extraction_depots.class.inc
+++ b/src/module_extraction/web_service/ws/Extraction_depots.class.inc
@@ -420,7 +420,6 @@ class Extraction_depots extends ExtractionExtraction
                     $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']);
                     //$this->oBO->insertOrder('EM0160AYYTK48', 'bo_id=' . $this->aValues["bo_id"]  . '|sourceDir=' . end(explode("/", $sDirPath)) . '/' . $this->aValues["control_file_name"] . '|sourceMotif=' . $sExtension . '|schema=' . $sSchemaContrainte . '|format=ACAD|destDir=' . $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot/' . $_SERVER["REMOTE_ADDR"] . "/Fichiers déposés");
                     $this->oBO->insertOrder('EM0160AYYTK48', 'bo_id=' . $this->aValues["bo_id"] . '|sourceDir=' . $sDirPath . '/' . $this->aValues["control_file_name"] . '|sourceMotif=' . $sExtension . '|schema=' . $sSchemaContrainte . '|format='.$sFormat.'|depotDir=' . $this->aProperties['ws_data_dir'] . '/extraction/extraction_depot/' . $_SERVER["REMOTE_ADDR"] . '/Fichiers déposés/' . $this->aValues["control_file_name"]);
-                    error_log(print_r($this, true));
                 } else {
                     //Si l'extension n'est pas bonne
                     $error_message .= $this->aValues["control_file_name"] . " format is not authaurized (" . $sExtension . ")";
diff --git a/src/module_extraction/web_service/ws/Extractions.class.inc b/src/module_extraction/web_service/ws/Extractions.class.inc
index b6de8c2f..20ba20bb 100755
--- a/src/module_extraction/web_service/ws/Extractions.class.inc
+++ b/src/module_extraction/web_service/ws/Extractions.class.inc
@@ -225,7 +225,6 @@ class Extractions extends ExtractionExtraction
      */
     public function PUT()
     {
-        $this->test = 1234;
         // Upload l'acte d'engagement.
         $this->uploadDocument('ae', 'extraction_extraction_extraction');
         //
@@ -592,25 +591,6 @@ class Extractions extends ExtractionExtraction
         $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']);
         // Check si la table existe si oui change l'état
         $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Fichier accepté");
-        //error_log(print_r($this->order_id, true));
-        $this->sRessourcesFile = "ExtractionExtraction.class.sql.inc";
-        require $this->sRessourcesFile;
-        $sSql = $aSql['getDepositFile'];
-        //error_log(print_r($this, true));
-        /*$aSQLParams = array(
-        'schema_gtf' => array('value' => $this->aProperties['schema_gtf'], 'type' => 'schema_name'),
-        'order_id'      => array('value' => $this->aValues['order_id'], 'type' => 'number'),
-        );
-
-        $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, $aSQLParams);
-        if (!$this->oConnection->oBd->enErreur()) {
-        $aResult = $this->oConnection->oBd->getResultTableAssoc($oPDOresult);
-        foreach ($aResult as $sWkParams) {
-        $sParams[] = $sWkParams['wk_params'];
-        }
-        }
-
-        $sDirPath = $this->aProperties["upload_dir"] . $sParams[0];*/
 
         //$this->oBO->sendmail(id_du_mail_pour_dire_que_le_fichier_est_accepté);
         $this->trReception();
@@ -626,7 +606,7 @@ class Extractions extends ExtractionExtraction
 
         // Check si la table existe si oui change l'état
         $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Fichier invalidé");
-        //$this->oBO->sendmail(id_du_mail_pour_dire_que_le_fichier_est_invalidé);
+        $this->oBO->sendmail(1057);
         $this->trRetour();
 
     }
-- 
GitLab