Entreprise - getLiens : remove Application_Model
This commit is contained in:
parent
64a9931738
commit
cbae95cf2b
@ -832,30 +832,31 @@ class Entreprise extends Scores_Ws_Server
|
||||
|
||||
//Load country table
|
||||
try {
|
||||
$countryM = new Application_Model_JoTabPays();
|
||||
$sql = $countryM->select()->from($countryM, array('codPays3', 'libPays'));
|
||||
$result = $countryM->fetchAll($sql);
|
||||
} catch (Zend_Db_Adapter_Exception $e) {
|
||||
$sql = "SELECT codPays3, libPays FROM jo.tabPays";
|
||||
$stmt = $this->conn->prepare($sql);
|
||||
$stmt->execute();
|
||||
} catch(\Doctrine\DBAL\DBALException $e) {
|
||||
if ($this->logger !== null) {
|
||||
$this->logger->error($e->getMessage());
|
||||
}
|
||||
if ($this->User->idClient == 1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
} else {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
} catch (Zend_Exception $e) {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
|
||||
|
||||
$tabPays = array();
|
||||
if ( $result->count()>0 ) {
|
||||
foreach ( $result as $item ) {
|
||||
if ($stmt->count() > 0) {
|
||||
while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) {
|
||||
$tabPays[$item->codPays3] = $item->libPays;
|
||||
}
|
||||
}
|
||||
|
||||
$tabAct = $tabPar = $tabDir = array();
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
$liensM = new Metier_Liens_Base();
|
||||
$liensM->setId($siren, 'siren');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user