diff --git a/batch/enrichissement.php b/batch/enrichissement.php index 894038ed..e3b4b6aa 100644 --- a/batch/enrichissement.php +++ b/batch/enrichissement.php @@ -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; }