Condition positive

This commit is contained in:
Michael RICOIS 2017-03-31 12:29:56 +02:00
parent b4acea6de5
commit 2ba274de1d

View File

@ -1460,10 +1460,10 @@ class Saisie extends Scores_Ws_Server
$row = $bilansM->fetchRow($sql);
} catch (Zend_Db_Exception $e) {
if ($this->User->idClient!=1) {
throw new SoapFault('ERR', "Application error");
} else {
if ($this->User->idClient == 1) {
throw new SoapFault('ERR', $e->getMessage());
} else {
throw new SoapFault('ERR', "Application error");
}
}
@ -1493,10 +1493,10 @@ class Saisie extends Scores_Ws_Server
try {
$id = $bilansM->insert($dataToInsert);
} catch (Zend_Db_Exception $e) {
if ($this->User->idClient!=1) {
throw new SoapFault('ERR', "Application error");
} else {
if ($this->User->idClient == 1) {
throw new SoapFault('ERR', $e->getMessage());
} else {
throw new SoapFault('ERR', "Application error");
}
}
}
@ -1512,10 +1512,10 @@ class Saisie extends Scores_Ws_Server
try {
$historiquesM->insert($backupData);
} catch (Zend_Db_Exception $e) {
if ($this->User->idClient!=1) {
throw new SoapFault('ERR', "Application error");
} else {
if ($this->User->idClient == 1) {
throw new SoapFault('ERR', $e->getMessage());
} else {
throw new SoapFault('ERR', "Application error");
}
}
@ -1540,10 +1540,10 @@ class Saisie extends Scores_Ws_Server
try {
$id = $bilansM->update($dataToUpdate, 'id = '.$row->id);
} catch (Zend_Db_Exception $e) {
if ($this->User->idClient!=1) {
throw new SoapFault('ERR', "Application error");
} else {
if ($this->User->idClient == 1) {
throw new SoapFault('ERR', $e->getMessage());
} else {
throw new SoapFault('ERR', "Application error");
}
}
@ -1566,10 +1566,10 @@ class Saisie extends Scores_Ws_Server
'postesDiff' => implode(';', $postesDiff),
));
} catch (Zend_Db_Exception $e) {
if ($this->User->idClient!=1) {
throw new SoapFault('ERR', "Application error");
} else {
if ($this->User->idClient == 1) {
throw new SoapFault('ERR', $e->getMessage());
} else {
throw new SoapFault('ERR', "Application error");
}
}