From 69b3c56ec879a1d0940fece7f39a02dc89dcaae1 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Wed, 7 Nov 2012 17:18:56 +0000 Subject: [PATCH] issue #001391 : Suppression de l'update sur les documents --- library/WsScore/Saisie/v0.2/Saisie.php | 51 +++++++------------------- 1 file changed, 14 insertions(+), 37 deletions(-) diff --git a/library/WsScore/Saisie/v0.2/Saisie.php b/library/WsScore/Saisie/v0.2/Saisie.php index c2d231fb..4d8a6f4b 100644 --- a/library/WsScore/Saisie/v0.2/Saisie.php +++ b/library/WsScore/Saisie/v0.2/Saisie.php @@ -1832,44 +1832,21 @@ class Saisie extends WsScore } //Update else { - - if ($dataDoc['actif']==0) { - - unset($dataDoc['actif']); - $dataDoc = array_merge($dataDoc, array( - 'idSuppr' => $this->tabInfoUser['id'], - 'dateSuppr' => date('YmdHis'), - )); - - try { - $id = $docM->update($dataDoc, 'id = '.$id); - } catch (Zend_Db_Exception $e) { - if ($this->tabInfoUser['idClient']!=1) { - throw new SoapFault('ERR', "Application error"); - } else { - throw new SoapFault('ERR', $e->getMessage()); - } - } - - } else { - - $dataDoc = array_merge($dataDoc, array( - 'idUpdate' => $this->tabInfoUser['id'], - 'dateUpdate' => date('YmdHis'), - )); - - try { - $id = $docM->update($dataDoc, 'id = '.$id); - } catch (Zend_Db_Exception $e) { - if ($this->tabInfoUser['idClient']!=1) { - throw new SoapFault('ERR', "Application error"); - } else { - throw new SoapFault('ERR', $e->getMessage()); - } - } - - } + $dataDoc = array_merge($dataDoc, array( + 'idSuppr' => $this->tabInfoUser['id'], + 'dateSuppr' => date('YmdHis'), + )); + + try { + $id = $docM->update($dataDoc, 'id = '.$id); + } catch (Zend_Db_Exception $e) { + if ($this->tabInfoUser['idClient']!=1) { + throw new SoapFault('ERR', "Application error"); + } else { + throw new SoapFault('ERR', $e->getMessage()); + } + } }