From 689566d34c97ac999a465c1bc0eb62f445dbfe55 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 6 Apr 2012 10:24:56 +0000 Subject: [PATCH] =?UTF-8?q?Correction=20pour=20la=20r=C3=A9cup=C3=A9ration?= =?UTF-8?q?=20de=20l'activit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- batch/enrichissement.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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; }