Correction pour la récupération de l'activité

This commit is contained in:
Michael RICOIS 2012-04-06 10:24:56 +00:00
parent 2da9a49174
commit 689566d34c

View File

@ -260,6 +260,15 @@ require_once realpath(dirname(__FILE__)).'/../config/config.php';
require_once 'framework/fwk.php';
require_once 'Metier/insee/classMInsee.php';
//MetadataCache pour la base de données
$frontendOptions = array(
'lifetime' => 14400,
'automatic_serialization' => true
);
$backendOptions = array();
$cache = Zend_Cache::factory('Core','Apc', $frontendOptions, $backendOptions);
Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
//Définition bdd metier
$dbConfig = array(
'host' => MYSQL_HOST,
@ -597,8 +606,9 @@ function dateFermetureEnData($siren, $nic, $values = false)
function activiteData($siren, $nic, $values = false)
{
global $fJur;
$tmp = @$iBodacc->getActiviteReelle($siren, $fJur);
$tabData['activite'] = @preg_replace('/ +/', ' ', strtr($tmp,array("\r"=>' ',"\n"=>' ',"\t"=>' ',','=>' ',';'=>' ','"'=>' ',"'"=>' ')));
$iBodacc = new MBodacc();
$tmp = $iBodacc->getActiviteReelle($siren, $fJur);
$tabData['activite'] = preg_replace('/ +/', ' ', strtr($tmp,array("\r"=>' ',"\n"=>' ',"\t"=>' ',','=>' ',';'=>' ','"'=>' ',"'"=>' ')));
return $tabData;
}