issue #001391 : Suppression de l'update sur les documents

This commit is contained in:
Michael RICOIS 2012-11-07 17:18:56 +00:00
parent 3244f23900
commit 69b3c56ec8

View File

@ -1832,44 +1832,21 @@ class Saisie extends WsScore
} }
//Update //Update
else { else {
if ($dataDoc['actif']==0) {
unset($dataDoc['actif']);
$dataDoc = array_merge($dataDoc, array( $dataDoc = array_merge($dataDoc, array(
'idSuppr' => $this->tabInfoUser['id'], 'idSuppr' => $this->tabInfoUser['id'],
'dateSuppr' => date('YmdHis'), 'dateSuppr' => date('YmdHis'),
)); ));
try { try {
$id = $docM->update($dataDoc, 'id = '.$id); $id = $docM->update($dataDoc, 'id = '.$id);
} catch (Zend_Db_Exception $e) { } catch (Zend_Db_Exception $e) {
if ($this->tabInfoUser['idClient']!=1) { if ($this->tabInfoUser['idClient']!=1) {
throw new SoapFault('ERR', "Application error"); throw new SoapFault('ERR', "Application error");
} else { } else {
throw new SoapFault('ERR', $e->getMessage()); 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());
}
}
}
} }