Use remote var
This commit is contained in:
parent
eae820245e
commit
525d25eccc
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
define('ARTISANAT_DISPO_WEB', 1);
|
|
||||||
require_once 'framework/common/curl.php';
|
require_once 'framework/common/curl.php';
|
||||||
|
|
||||||
class Metier_Partenaires_MArtisanat
|
class Metier_Partenaires_MArtisanat
|
||||||
@ -29,14 +28,18 @@ class Metier_Partenaires_MArtisanat
|
|||||||
|
|
||||||
public function getIdentite($siren)
|
public function getIdentite($siren)
|
||||||
{
|
{
|
||||||
|
$data = array();
|
||||||
$siren = $siren * 1;
|
$siren = $siren * 1;
|
||||||
$res = $this->iDb->select('jo.artisanat', 'id, siren, actif, numRM, denomination, sigle, nomCommercial, enseigne, fj, effectif, aprm, debutActivite, activite, adresse, cp, ville, cessation, radiation, nbInscriptions, nom, prenom, nomUsage, dateNaiss, lieuNaiss, natio, qualite, qualif, dateQualif, dateFctDeb, dateFctFin, IF(dateInsert>dateUpdate,dateInsert,dateUpdate) AS dateUpdate', "siren=$siren", false, MYSQL_ASSOC);
|
$res = $this->iDb->select('jo.artisanat', 'id, siren, actif, numRM, denomination, sigle, nomCommercial, enseigne, fj, effectif, aprm, debutActivite, activite, adresse, cp, ville, cessation, radiation, nbInscriptions, nom, prenom, nomUsage, dateNaiss, lieuNaiss, natio, qualite, qualif, dateQualif, dateFctDeb, dateFctFin, IF(dateInsert>dateUpdate,dateInsert,dateUpdate) AS dateUpdate', "siren=$siren", false, MYSQL_ASSOC);
|
||||||
if (count($res)>0 && !$this->remote) {
|
if ($this->remote) {
|
||||||
$tabInsert = $res[0];
|
$data = $this->getRemoteIdentite();
|
||||||
} elseif (ARTISANAT_DISPO_WEB) {
|
} else {
|
||||||
$tabInsert = $this->getRemoteIdentite();
|
if (count($res) > 0) {
|
||||||
|
$data = $res[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $tabInsert;
|
|
||||||
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRemoteIdentite()
|
public function getRemoteIdentite()
|
||||||
|
Loading…
Reference in New Issue
Block a user