Remove some notice and warning

This commit is contained in:
Michael RICOIS 2015-06-24 10:17:52 +00:00
parent 56dfbb11b0
commit 0222b6d629
6 changed files with 18 additions and 13 deletions

View File

@ -303,6 +303,8 @@ class MLiens2
if (null !== $row) {
return $row->current();
}
return null;
}
/**

View File

@ -410,6 +410,7 @@ class Scores_Ws_Server
$test=0;
}
$siren = 0;
if ( strlen($siret) == 14 ) {
$siren = substr($siret,0,9);
$nic = substr($siret,9,5);

View File

@ -1313,7 +1313,7 @@ class Entreprise extends Scores_Ws_Server
$output->capital = new stdClass();
$output->capital->amount = $result['capital'];
$output->capital->currency = $result['devCapital'];
$output->capital->currency = $result['deviseCapital'];
//@todo : Utiliser le libellé du pays
$output->adressePays = $result['adresse_pays'];

View File

@ -294,10 +294,10 @@ class Entreprise extends Scores_Ws_Server
}
// --- Détermination du groupe - Tête de groupe
if (!empty($siren)) {
if (intval($siren) > 100) {
$lienM = new MLiens2($siren, 'siren');
$grpFiche = $lienM->getIdentity();
$grpHeadId = $lienM->getHead(null, 50);
$grpFiche = $lienM->getIdentity();
if ($grpFiche->id != $grpHeadId) {
$grpHeadFiche = $lienM->getIdentity($grpHeadId);
$identite->GroupeId = str_pad($grpHeadFiche->id, 20, 0, STR_PAD_LEFT); // Ajouter source
@ -336,7 +336,6 @@ class Entreprise extends Scores_Ws_Server
}
}
$this->wsLog('identite', $siret, $id);
return $identite;

View File

@ -29,10 +29,11 @@ class Gestion extends Scores_Ws_Server
break;
}
//Authentification des applications par login
// --- Authentification des applications par login
$this->authenticate();
//Enregistrement authentification OK
// --- Enregistrement authentification OK
// @todo : Ajout userAgent
try {
$authLogM = new Application_Model_Sdv1UtilisateursAuthLog();
$authLogM->insert(array(
@ -57,12 +58,12 @@ class Gestion extends Scores_Ws_Server
try {
$browserLogM = new Application_Model_Sdv1UtilisateursBrowserLog();
$browserLogM->insert(array(
'idClient' => $this->User->idClient,
'idUser' => $this->User->id,
'service' => $this->User->serviceCode,
'login' => $this->User->login,
'authenticate' => 'OK',
'ip' => $ip,
'idClient' => $this->User->idClient,
'idUser' => $this->User->id,
'service' => $this->User->serviceCode,
'login' => $this->User->login,
'authenticate' => 'OK',
'ip' => $ip,
));
} catch (Zend_Db_Exception $e) {}
}

View File

@ -1874,7 +1874,9 @@ class Saisie extends Scores_Ws_Server
$lienrefM = new Application_Model_JoLiensRef();
$sql = $lienrefM->select()->where('siren=?',$id);
$row = $lienrefM->fetchRow($sql);
$idNum = $row->id;
if (null !== $row) {
$idNum = $row->id;
}
$type = 'Entreprise';
}
//Type = Lien