Partner : return value in fonction

This commit is contained in:
Michael RICOIS 2013-10-17 07:39:36 +00:00
parent b7be1a7ab0
commit 078e2e6060

View File

@ -77,6 +77,10 @@ class Scores_Partner_Report
$ws = new WsScores($this->login, $this->password); $ws = new WsScores($this->login, $this->password);
$infos = $ws->getRapport($siren, 3, 0); $infos = $ws->getRapport($siren, 3, 0);
if ($infos===false) {
return false;
}
//Identite //Identite
require_once 'Scores/IdentiteEntreprise.php'; require_once 'Scores/IdentiteEntreprise.php';
$identite = new IdentiteEntreprise($infos->Identite); $identite = new IdentiteEntreprise($infos->Identite);
@ -642,13 +646,15 @@ class Scores_Partner_Report
//Global //Global
$this->data->Global->raisonSociale = $infos->Identite->Nom; $this->data->Global->raisonSociale = $infos->Identite->Nom;
return true;
} }
public function getContent() public function getContent()
{ {
$content = ''; $content = '';
$this->getDataIndiscore3(); if ( $this->getDataIndiscore3() ) {
if ( array_key_exists($this->reportName, $this->report) ) { if ( array_key_exists($this->reportName, $this->report) ) {
@ -667,6 +673,10 @@ class Scores_Partner_Report
} }
return $content; return $content;
}
return false;
} }
} }