Compare commits

...

10 Commits

Author SHA1 Message Date
potier
5eb4e10abe Merge branch 'develop' into 'master'
Develop into master : logger + avis situations staging spécifique + SD 30

See merge request !3
2017-04-13 12:43:25 +00:00
Michael RICOIS
00b22c28e5 Better debug 2017-04-13 14:23:16 +02:00
Michael RICOIS
ef3842021f Debug Level 2017-04-13 12:11:34 +02:00
Michael RICOIS
cf5d50ea2e Réorganisation du debug 2017-04-13 11:42:07 +02:00
Michael RICOIS
d047c57d67 Session avec Scores_Ws_Client 2017-04-13 11:21:10 +02:00
Michael RICOIS
4f28b3fcb8 Merge branch 'develop' of git@gitlab.factory.insight.doubletrade.com:scores/extranet.git into develop 2017-04-13 10:41:36 +02:00
Michael RICOIS
1f90b825f4 Logger : Stop only at notice 2017-04-13 10:41:18 +02:00
benoitpotier
a6be515460 Merge branch 'develop' of gitlab.factory.insight.doubletrade.com:scores/extranet into develop 2017-04-12 11:32:39 +02:00
benoitpotier
c709e9c659 suppression specificité staging 2017-04-12 11:32:28 +02:00
potier
6100b956bc Merge branch 'develop' into 'master'
Develop into master - confidentiel

See merge request !2
2017-04-03 13:44:07 +00:00
5 changed files with 99 additions and 96 deletions

View File

@ -123,9 +123,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
if (APPLICATION_ENV == 'development') {
$level = Logger::DEBUG;
} else {
$level = Logger::INFO;
$level = Logger::NOTICE;
}
$log->pushHandler(new StreamHandler($logFile), $level);
$log->pushHandler(new StreamHandler($logFile, $level));
// Processor
$log->pushProcessor(new IntrospectionProcessor());

View File

@ -125,8 +125,7 @@ class IdentiteController extends Zend_Controller_Action
$datemajTexte = $dateDerMaj = '';
$datemajTexte.= '<table>';
foreach ($tabDate as $dateId => $dateLib ) {
if ( isset($infos->{$dateId})
&& !empty($infos->{$dateId})
if (isset($infos->{$dateId}) && !empty($infos->{$dateId})
&& $infos->{$dateId}!='0000-00-00') {
if ( $dateId == 'DateMajID') {
@ -1233,12 +1232,7 @@ class IdentiteController extends Zend_Controller_Action
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
// --- En environement de preprod, on envoi sur le site
if (APPLICATION_ENV == 'staging') {
$this->redirect('http://avis-situation-sirene.insee.fr/');
}
// --- Téléchargement du fichier et distribution
else {
$avis = new Scores_Insee_AvisSituation($this->siret);
if ( !$avis->erreur() ) {
$avis->erreurcpt('raz');
@ -1282,7 +1276,6 @@ class IdentiteController extends Zend_Controller_Action
echo $avis->erreurmsg();
}
}
}
/**
* Téléchargement des cartes IRIS

View File

@ -123,10 +123,11 @@ class Scores_Session_Entreprise
protected function getInfoEntrep($siret, $id = 0)
{
$this->logger->info('getInfoEntrep');
require_once 'Scores/WsScores.php';
$ws = new WsScores();
$etab = $ws->getIdentiteLight($siret, $id);
$ws = new Scores_Ws_Client('interne', '0.6');
$params = new stdClass();
$params->siret = $this->siret;
$params->id = $this->id;
$etab= $ws->getIdentiteLight($params);
$this->setSession($etab);
}

View File

@ -147,7 +147,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
}
$methodConfig = $this->config[$name];
$this->logger->info(print_r($methodConfig,1));
// --- Cache
$cacheEnable = false;
if ( array_key_exists('cache', $methodConfig) ) {
@ -172,17 +172,22 @@ class Scores_Ws_Client extends Zend_Soap_Client
// --- Debug
if ( array_key_exists('debug', $methodConfig) ) {
$this->logger->info(__CLASS__.'->'.$name);
$this->logger->info(print_r($arguments,1));
$this->logger->info(__CLASS__.'->'.$name.':'.print_r($arguments,1));
}
try {
$response = parent::__call($name, $arguments);
// --- Response vide
if ($response == '') {
$this->logger->error(__CLASS__.'->'.$name.':'.print_r($arguments, 1));
return false;
}
// --- Debug
if ( array_key_exists('debug', $methodConfig) ) {
$this->logger->info(print_r($response,1));
$this->logger->info(__CLASS__.'->'.$name.':'.print_r($response,1));
}
// --- Cache
@ -196,13 +201,13 @@ class Scores_Ws_Client extends Zend_Soap_Client
// --- Debug
if ( array_key_exists('debug', $methodConfig) ) {
$this->logger->info($fault->faultcode.' - '.$fault->faultstring);
$this->logger->error(__CLASS__.'->'.$name.':'.$fault->faultcode.' - '.$fault->faultstring);
}
// --- Gestion des SOAP fault
if ( array_key_exists('errorMsg', $methodConfig) ) {
if ( in_array($fault->faultcode, $methodConfig['errorMsg']) ) {
$this->logger->info("Exception as error message : ".$fault->faultcode);
$this->logger->info(__CLASS__.'->'.$name.':'." Exception as error message : ".$fault->faultcode);
throw new Exception($fault->faultstring);
}
}

View File

@ -1,6 +1,10 @@
<?php
return array(
'0.6' => array(
'getIdentiteLight' => array(
'debug' => true,
'log' => 'mail',
),
'getRncsEven' => array(
'debug' => true,
'log' => 'mail',