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
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());
}
}
}