Add logger

This commit is contained in:
Michael RICOIS 2017-02-13 13:53:52 +01:00
parent a880dea68d
commit f55fa25915
16 changed files with 74 additions and 74 deletions

View File

@ -80,7 +80,7 @@ class AideController extends Zend_Controller_Action
require_once 'Scores/WsScores.php'; require_once 'Scores/WsScores.php';
$ws = new WsScores(); $ws = new WsScores();
$accept = $ws->setCGU(); $accept = $ws->setCGU();
Zend_Registry::get('firebug')->info($accept); $this->logger->info($accept);
if ($accept) { if ($accept) {
//Put in session //Put in session
$auth = Zend_Auth::getInstance(); $auth = Zend_Auth::getInstance();

View File

@ -106,7 +106,7 @@ class AuthController extends Zend_Controller_Action
try { try {
$ws = new Scores_Ws_Client('gestion', '0.3'); $ws = new Scores_Ws_Client('gestion', '0.3');
$InfosLogin = $ws->getInfosLogin($parameters); $InfosLogin = $ws->getInfosLogin($parameters);
Zend_Registry::get('firebug')->info($InfosLogin); $this->logger->info($InfosLogin);
if ( is_string($InfosLogin) || $InfosLogin->error->errnum != 0 ) { if ( is_string($InfosLogin) || $InfosLogin->error->errnum != 0 ) {
$this->view->Error = true; $this->view->Error = true;
} else { } else {

View File

@ -93,7 +93,7 @@ class BdfController extends Zend_Controller_Action
$req = substr($siret, 0, 9); $req = substr($siret, 0, 9);
} }
Zend_Registry::get('firebug')->info($module); $this->logger->info($module);
$content = array(); $content = array();

View File

@ -792,7 +792,7 @@ class DashboardController extends Zend_Controller_Action
$user = $ws->getUser($login); $user = $ws->getUser($login);
$options = json_decode($user, true); $options = json_decode($user, true);
Zend_Registry::get('firebug')->info($user); $this->logger->info($user);
$this->view->assign('droits', explode(' ',$options['droits'])); $this->view->assign('droits', explode(' ',$options['droits']));
$this->view->assign('prefs', explode(' ',$options['pref'])); $this->view->assign('prefs', explode(' ',$options['pref']));
@ -878,7 +878,7 @@ class DashboardController extends Zend_Controller_Action
} }
} }
Zend_Registry::get('firebug')->info($output); $this->logger->info($output);
$this->view->assign('output', $output); $this->view->assign('output', $output);
} }
@ -993,7 +993,7 @@ class DashboardController extends Zend_Controller_Action
//Liste des periodes de facturation //Liste des periodes de facturation
$contrats = $ws->getClientTarifs($idClient); $contrats = $ws->getClientTarifs($idClient);
Zend_Registry::get('firebug')->info($contrats); $this->logger->info($contrats);
$this->view->assign('contrats', $contrats->item); $this->view->assign('contrats', $contrats->item);
//Liste des services //Liste des services

View File

@ -465,7 +465,7 @@ class EvaluationController extends Zend_Controller_Action
$email = $request->getParam('email', ''); $email = $request->getParam('email', '');
$infos = $ws->getRapport($siren, 3, 0, $plus, $ref, $encours, $email); $infos = $ws->getRapport($siren, 3, 0, $plus, $ref, $encours, $email);
Zend_Registry::get('firebug')->info($infos); $this->logger->info($infos);
if ($infos === false) { if ($infos === false) {
$this->forward('soap', 'error'); $this->forward('soap', 'error');
} }

View File

@ -746,7 +746,7 @@ class FinanceController extends Zend_Controller_Action
if ($result === false) { if ($result === false) {
$this->view->msg = "Erreur lors de l'enregistrement des informations"; $this->view->msg = "Erreur lors de l'enregistrement des informations";
} else { } else {
Zend_Registry::get('firebug')->info($result); $this->logger->info($result);
$this->view->ref = strtoupper($result); $this->view->ref = strtoupper($result);
$this->view->fileref = $params['siren'] . '_' . $params['format'] . '_' . $this->view->fileref = $params['siren'] . '_' . $params['format'] . '_' .
substr($params['dateCloture'],6,4) . substr($params['dateCloture'],3,2) . substr($params['dateCloture'],6,4) . substr($params['dateCloture'],3,2) .

View File

@ -465,7 +465,7 @@ class IdentiteController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getEtablissementsGeo($siren, $actif, $position, $nbAffichage); $infos = $ws->getEtablissementsGeo($siren, $actif, $position, $nbAffichage);
Zend_Registry::get('firebug')->info($infos); $this->logger->info($infos);
if ($infos === false) $this->forward('soap', 'error'); if ($infos === false) $this->forward('soap', 'error');
$etabs = $infos->result->item; $etabs = $infos->result->item;
@ -531,7 +531,7 @@ class IdentiteController extends Zend_Controller_Action
'gps' => $gps, 'gps' => $gps,
); );
} }
Zend_Registry::get('firebug')->info($marks); $this->logger->info($marks);
} }
$this->view->assign('marks', json_encode($marks)); $this->view->assign('marks', json_encode($marks));
} }
@ -1081,7 +1081,7 @@ class IdentiteController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$result = $ws->getLienRef($id); $result = $ws->getLienRef($id);
Zend_Registry::get('firebug')->info($result); $this->logger->info($result);
$this->view->assign('result', $result); $this->view->assign('result', $result);
$this->view->assign('idFiche', $id); $this->view->assign('idFiche', $id);
@ -1497,7 +1497,7 @@ class IdentiteController extends Zend_Controller_Action
$result = $ws->getGroupesArbo($siren, $pctMin, 10, $stopAtIsin); $result = $ws->getGroupesArbo($siren, $pctMin, 10, $stopAtIsin);
if ( $result!==false ) { if ( $result!==false ) {
$infos = json_decode($result, true); $infos = json_decode($result, true);
Zend_Registry::get('firebug')->info($infos); $this->logger->info($infos);
if (count($infos)>0) { if (count($infos)>0) {
$name = $infos['name']; $name = $infos['name'];
@ -1545,7 +1545,7 @@ class IdentiteController extends Zend_Controller_Action
if ( $result!==false ) { if ( $result!==false ) {
$infos = json_decode($result, true); $infos = json_decode($result, true);
Zend_Registry::get('firebug')->info($infos); $this->logger->info($infos);
if (count($infos)>0) { if (count($infos)>0) {
$sirenTxt = substr($infos['siren'],0,3).' '.substr($infos['siren'],3,3).' '.substr($infos['siren'],6,3); $sirenTxt = substr($infos['siren'],0,3).' '.substr($infos['siren'],3,3).' '.substr($infos['siren'],6,3);
@ -1662,7 +1662,7 @@ class IdentiteController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$result = $ws->getContactEt($companyId, $filter); $result = $ws->getContactEt($companyId, $filter);
Zend_Registry::get('firebug')->info($result); $this->logger->info($result);
if ($result->nbReponses>0) { if ($result->nbReponses>0) {
$this->view->assign('contacts', $result->result->item); $this->view->assign('contacts', $result->result->item);
@ -1726,7 +1726,7 @@ class IdentiteController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$result = $ws->getEntrepriseAvisRncs($siren); $result = $ws->getEntrepriseAvisRncs($siren);
Zend_Registry::get('firebug')->info($result); $this->logger->info($result);
if ( $result === false ) { if ( $result === false ) {
$this->view->assign('error', true); $this->view->assign('error', true);
@ -1905,7 +1905,7 @@ class IdentiteController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$result = $ws->getEntrepriseAvisRncs($siren); $result = $ws->getEntrepriseAvisRncs($siren);
Zend_Registry::get('firebug')->info($result); $this->logger->info($result);
if ( $result === false ) { if ( $result === false ) {
$this->view->assign('error', true); $this->view->assign('error', true);

View File

@ -93,7 +93,7 @@ class JuridiqueController extends Zend_Controller_Action
case 'bomp': case 'bomp':
$filtre = $request->getParam('filtre', 'A'); $filtre = $request->getParam('filtre', 'A');
$this->view->assign('filtre', $filtre); $this->view->assign('filtre', $filtre);
Zend_Registry::get('firebug')->info("getAnnoncesBoamp"); $this->logger->info("getAnnoncesBoamp");
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage); $infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage);
break; break;
case 'bodacc': case 'bodacc':
@ -108,7 +108,7 @@ class JuridiqueController extends Zend_Controller_Action
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage); $infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage);
break; break;
} }
Zend_Registry::get('firebug')->info($infos); $this->logger->info($infos);
if ($infos === false) { if ($infos === false) {
$this->forward('soap', 'error'); $this->forward('soap', 'error');
} }
@ -169,7 +169,7 @@ class JuridiqueController extends Zend_Controller_Action
foreach($objAnnonces->$classType as $ann) { foreach($objAnnonces->$classType as $ann) {
$annonces[] = $objAnnonces->getAnnonceResume($ann); $annonces[] = $objAnnonces->getAnnonceResume($ann);
} }
Zend_Registry::get('firebug')->info($annonces); $this->logger->info($annonces);
$this->view->assign('annonces', $annonces); $this->view->assign('annonces', $annonces);
} }
$this->view->headScript()->appendFile($this->theme->pathScript.'/annonces.js', 'text/javascript'); $this->view->headScript()->appendFile($this->theme->pathScript.'/annonces.js', 'text/javascript');
@ -245,7 +245,7 @@ class JuridiqueController extends Zend_Controller_Action
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage); $infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage);
break; break;
} }
Zend_Registry::get('firebug')->info($infos); $this->logger->info($infos);
if ($infos === false) { if ($infos === false) {
$this->forward('soap', 'error'); $this->forward('soap', 'error');
} }
@ -274,7 +274,7 @@ class JuridiqueController extends Zend_Controller_Action
foreach($objAnnonces->$classType as $ann) { foreach($objAnnonces->$classType as $ann) {
if($ann->id==$idAnn) break; if($ann->id==$idAnn) break;
} }
Zend_Registry::get('firebug')->info($ann); $this->logger->info($ann);
$annonce = array( $annonce = array(
'Desc' => $objAnnonces->getAnnonceDesc($ann), 'Desc' => $objAnnonces->getAnnonceDesc($ann),
'Entree' => $objAnnonces->getAnnonceEntree($ann), 'Entree' => $objAnnonces->getAnnonceEntree($ann),
@ -525,7 +525,7 @@ class JuridiqueController extends Zend_Controller_Action
if ($infos === false) $this->_forward('soap', 'error'); if ($infos === false) $this->_forward('soap', 'error');
$competences = $infos->result->item; $competences = $infos->result->item;
Zend_Registry::get('firebug')->info($infos); $this->logger->info($infos);
if( $type=='tri' || $type=='cfe' ) { if( $type=='tri' || $type=='cfe' ) {
$i=0; $i=0;
foreach($competences as $comp){ foreach($competences as $comp){
@ -560,7 +560,7 @@ class JuridiqueController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getListeConventions($siren); $infos = $ws->getListeConventions($siren);
$conventions = $infos->result->item; $conventions = $infos->result->item;
Zend_Registry::get('firebug')->info($conventions); $this->logger->info($conventions);
$this->view->assign('conventions', $conventions); $this->view->assign('conventions', $conventions);
$this->view->assign('exportObjet', $infos); $this->view->assign('exportObjet', $infos);
} }
@ -590,7 +590,7 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->assign('marques', $marques); $this->view->assign('marques', $marques);
$this->view->assign('idObject', $idObject); $this->view->assign('idObject', $idObject);
$this->view->assign('exportObjet', $marques); $this->view->assign('exportObjet', $marques);
Zend_Registry::get('firebug')->info($infos); $this->logger->info($infos);
} }
/** /**
@ -614,9 +614,9 @@ class JuridiqueController extends Zend_Controller_Action
if(!file_exists($directory.'/'.$file) if(!file_exists($directory.'/'.$file)
|| filesize($directory.'/'.$file)==0 ) { || filesize($directory.'/'.$file)==0 ) {
$cmd = 'php ' . APPLICATION_PATH . '/../scripts/jobs/getMarque.php ' . $numdepot; $cmd = 'php ' . APPLICATION_PATH . '/../scripts/jobs/getMarque.php ' . $numdepot;
Zend_Registry::get('firebug')->info($cmd); $this->logger->info($cmd);
$result = exec($cmd); $result = exec($cmd);
Zend_Registry::get('firebug')->info($result); $this->logger->info($result);
} }
//On vérfie que le fichier existe après le téléchargement //On vérfie que le fichier existe après le téléchargement
if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) { if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) {
@ -676,7 +676,7 @@ class JuridiqueController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$result = $ws->getAnnoncesNum($siren); $result = $ws->getAnnoncesNum($siren);
Zend_Registry::get('firebug')->info($result); $this->logger->info($result);
$numWS = array(); $numWS = array();
if (count($result->item)>0) { if (count($result->item)>0) {
foreach ($result->item as $item) { foreach ($result->item as $item) {

View File

@ -86,13 +86,13 @@ class MandataireController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
Zend_Registry::get('firebug')->info('idMandataire : '.$idMandataire); $this->logger->info('idMandataire : '.$idMandataire);
//Mode edition //Mode edition
if ($idMandataire != '') { if ($idMandataire != '') {
$idMandataire = (int)substr($idMandataire,1); $idMandataire = (int)substr($idMandataire,1);
$reponse = $ws->getMandataire($idMandataire); $reponse = $ws->getMandataire($idMandataire);
Zend_Registry::get('firebug')->info($reponse); $this->logger->info($reponse);
if ($reponse!==false) { if ($reponse!==false) {
$tabMandataires = json_decode($reponse, true); $tabMandataires = json_decode($reponse, true);
} else { } else {

View File

@ -141,7 +141,7 @@ class PiecesController extends Zend_Controller_Action
//Affichage des actes disponible //Affichage des actes disponible
$ws = new WsScores(); $ws = new WsScores();
$responses = $ws->getPiecesActes($siren); $responses = $ws->getPiecesActes($siren);
Zend_Registry::get('firebug')->info($responses); $this->logger->info($responses);
/* /*
* Construire la réponse pour affichage * Construire la réponse pour affichage
@ -509,7 +509,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
} catch (Zend_Http_Client_Exception $e) { } catch (Zend_Http_Client_Exception $e) {
Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage()); $this->logger->info('HTTP Exception : '.$e->getMessage());
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
} }
@ -637,7 +637,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
} catch (Zend_Http_Client_Exception $e) { } catch (Zend_Http_Client_Exception $e) {
Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage()); $this->logger->info('HTTP Exception : '.$e->getMessage());
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
} }
@ -836,10 +836,10 @@ class PiecesController extends Zend_Controller_Action
$params->companyId = $siren; $params->companyId = $siren;
$result = $ws->getAssoActes($params); $result = $ws->getAssoActes($params);
$actes = array(); $actes = array();
Zend_Registry::get('firebug')->info($result); $this->logger->info($result);
if (count($result->item) > 0) { if (count($result->item) > 0) {
foreach ($result->item as $item) { foreach ($result->item as $item) {
Zend_Registry::get('firebug')->info($item); $this->logger->info($item);
if ( $user->checkPerm('actes') ) { if ( $user->checkPerm('actes') ) {
$href = $this->view->url(array('controller'=>'pieces', 'action'=>'associationacte', $href = $this->view->url(array('controller'=>'pieces', 'action'=>'associationacte',
'siren'=>$siren, 'date'=> $item->Date), 'default', true); 'siren'=>$siren, 'date'=> $item->Date), 'default', true);
@ -908,7 +908,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
} catch (Zend_Http_Client_Exception $e) { } catch (Zend_Http_Client_Exception $e) {
Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage()); $this->logger->info('HTTP Exception : '.$e->getMessage());
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
@ -936,7 +936,7 @@ class PiecesController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$reponse = $ws->getPiecesBilans($siren); $reponse = $ws->getPiecesBilans($siren);
$listBilans = $reponse->result->item; $listBilans = $reponse->result->item;
Zend_Registry::get('firebug')->info($listBilans); $this->logger->info($listBilans);
$decision = ''; $decision = '';
foreach ( $listBilans as $item) { foreach ( $listBilans as $item) {
@ -1017,7 +1017,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
} catch (Zend_Http_Client_Exception $e) { } catch (Zend_Http_Client_Exception $e) {
Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage()); $this->logger->info('HTTP Exception : '.$e->getMessage());
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }

View File

@ -219,7 +219,7 @@ class PrintController extends Zend_Controller_Action
} }
$this->view->assign('controller', $elements['controller']); $this->view->assign('controller', $elements['controller']);
$this->view->assign('action', $elements['action']); $this->view->assign('action', $elements['action']);
Zend_Registry::get('firebug')->info($elements['params']); $this->logger->info($elements['params']);
$this->view->assign('params', $elements['params']); $this->view->assign('params', $elements['params']);
} }

View File

@ -296,7 +296,7 @@ class RechercheController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
if ($request->isPost() && $form->isValid($request->getParams())) { if ($request->isPost() && $form->isValid($request->getParams())) {
Zend_Registry::get('firebug')->info($form->getValues()); $this->logger->info($form->getValues());
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/persist/log'; $path = $c->profil->path->shared.'/persist/log';
@ -409,7 +409,7 @@ class RechercheController extends Zend_Controller_Action
//Giant //Giant
if( !empty($params['pays']) && $type == 'ent' ){ if( !empty($params['pays']) && $type == 'ent' ){
Zend_Registry::get('firebug')->info('RECHERCHE GIANT'); $this->logger->info('RECHERCHE GIANT');
$this->_forward('search', 'giant', null, $params); $this->_forward('search', 'giant', null, $params);
//Worldcheck //Worldcheck
} elseif ($type == 'wcheck' ) { } elseif ($type == 'wcheck' ) {
@ -927,7 +927,7 @@ class RechercheController extends Zend_Controller_Action
$sql->where("LOWER(libelle) ".$where); $sql->where("LOWER(libelle) ".$where);
} }
} }
Zend_Registry::get('firebug')->info($where); $this->logger->info($where);
$rows = $table->fetchAll($sql); $rows = $table->fetchAll($sql);
if ( count($rows)>0 ) { if ( count($rows)>0 ) {

View File

@ -556,7 +556,7 @@ class SaisieController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$reponse = $ws->getListeEtablissements($siren, -1, 0, 100); $reponse = $ws->getListeEtablissements($siren, -1, 0, 100);
$listeEtablissements = $reponse->result->item; $listeEtablissements = $reponse->result->item;
//Zend_Registry::get('firebug')->info(count($listeEtablissements)); //$this->logger->info(count($listeEtablissements));
$this->view->assign('ListeEtablissements', $listeEtablissements); $this->view->assign('ListeEtablissements', $listeEtablissements);
//Assign constantes //Assign constantes
$this->view->assign('selectDir', $selectDir); $this->view->assign('selectDir', $selectDir);
@ -949,7 +949,7 @@ class SaisieController extends Zend_Controller_Action
// --- Selection des valeurs du bilan en cours // --- Selection des valeurs du bilan en cours
if ( null !== $milDate ) { if ( null !== $milDate ) {
Zend_Registry::get('firebug')->info('milDate'); $this->logger->info('milDate');
$response = $ws->getBilan($siren, $milDate, $type, true); $response = $ws->getBilan($siren, $milDate, $type, true);
$infos = new stdClass(); $infos = new stdClass();
$infos->siren = $response->siren; $infos->siren = $response->siren;
@ -965,9 +965,9 @@ class SaisieController extends Zend_Controller_Action
} }
// --- Selection des valeurs du bilan précédent pour remplir la colonne N-1 // --- Selection des valeurs du bilan précédent pour remplir la colonne N-1
elseif ( null === $milDate && null !== $milDatePre ) { elseif ( null === $milDate && null !== $milDatePre ) {
Zend_Registry::get('firebug')->info('milDatePre'); $this->logger->info('milDatePre');
$response = $ws->getBilan($siren, $milDatePre, $type, true); $response = $ws->getBilan($siren, $milDatePre, $type, true);
Zend_Registry::get('firebug')->info($response); $this->logger->info($response);
$infos = new stdClass(); $infos = new stdClass();
$infos->siren = $response->siren; $infos->siren = $response->siren;
$infos->dateCloturePre = $response->DATE_CLOTURE; $infos->dateCloturePre = $response->DATE_CLOTURE;
@ -1362,13 +1362,13 @@ class SaisieController extends Zend_Controller_Action
$params['step'] $params['step']
); );
Zend_Registry::get('firebug')->info($response); $this->logger->info($response);
if (is_int($response)) { if (is_int($response)) {
$this->view->assign('result', array('status'=>'OK')); $this->view->assign('result', array('status'=>'OK'));
} else { } else {
if ( preg_match_all('/([A-Z0-9]{2,});?/', $response, $postes) ) { if ( preg_match_all('/([A-Z0-9]{2,});?/', $response, $postes) ) {
Zend_Registry::get('firebug')->info($postes[1]); $this->logger->info($postes[1]);
$this->view->assign('result', array( $this->view->assign('result', array(
'status'=>'ERR', 'status'=>'ERR',
'message'=>'Erreur valeur', 'message'=>'Erreur valeur',
@ -1400,7 +1400,7 @@ class SaisieController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
Zend_Registry::get('firebug')->info('createfiche:'.$createFiche); $this->logger->info('createfiche:'.$createFiche);
$id2 = null; $id2 = null;
@ -1442,16 +1442,16 @@ class SaisieController extends Zend_Controller_Action
); );
$id2 = $ws->setLienRef(json_encode($infos)); $id2 = $ws->setLienRef(json_encode($infos));
if (is_int($id2)) { if (is_int($id2)) {
Zend_Registry::get('firebug')->info('id2:'.$id2); $this->logger->info('id2:'.$id2);
$this->view->assign('id2', $id2); $this->view->assign('id2', $id2);
$this->view->assign('id2Nom', $result->Nom); $this->view->assign('id2Nom', $result->Nom);
} }
} }
if ( $lienRef !== null ) { if ( $lienRef !== null ) {
Zend_Registry::get('firebug')->info('lienRef:'.$lienRef); $this->logger->info('lienRef:'.$lienRef);
$result = $ws->getLienRef($lienRef); $result = $ws->getLienRef($lienRef);
Zend_Registry::get('firebug')->info($result); $this->logger->info($result);
$rs = $result->raisonSociale; $rs = $result->raisonSociale;
//Override session session //Override session session
if ( intval($result->siren) != 0 ) { if ( intval($result->siren) != 0 ) {
@ -1488,7 +1488,7 @@ class SaisieController extends Zend_Controller_Action
$result = $ws->getSaisieLien($idLien); $result = $ws->getSaisieLien($idLien);
$infos = json_decode($result, true); $infos = json_decode($result, true);
Zend_Registry::get('firebug')->info($infos); $this->logger->info($infos);
if ($type=='actionnaire') { if ($type=='actionnaire') {
$this->view->assign('id1', $infos['idPar']); $this->view->assign('id1', $infos['idPar']);
@ -1529,7 +1529,7 @@ class SaisieController extends Zend_Controller_Action
$result = $ws->getSaisieLien($idLien); $result = $ws->getSaisieLien($idLien);
$infos = json_decode($result, true); $infos = json_decode($result, true);
Zend_Registry::get('firebug')->info($infos); $this->logger->info($infos);
if ($type=='actionnaire') { if ($type=='actionnaire') {
$this->view->assign('id1', $infos['idPar']); $this->view->assign('id1', $infos['idPar']);
@ -1600,7 +1600,7 @@ class SaisieController extends Zend_Controller_Action
'idLoc3Num' => '', 'idLoc3Num' => '',
); );
$idNewLien = $ws->setLienRef(json_encode($infos)); $idNewLien = $ws->setLienRef(json_encode($infos));
Zend_Registry::get('firebug')->info('idNewLien:'.$idNewLien); $this->logger->info('idNewLien:'.$idNewLien);
if ( is_int($idNewLien) ) { if ( is_int($idNewLien) ) {
$this->view->assign('id1', $idNewLien); $this->view->assign('id1', $idNewLien);
} }
@ -1631,7 +1631,7 @@ class SaisieController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$result = $ws->searchLienRef($query, $type); $result = $ws->searchLienRef($query, $type);
Zend_Registry::get('firebug')->info($result); $this->logger->info($result);
$output = array(); $output = array();
if (count($result->item)>0) { if (count($result->item)>0) {
foreach ($result->item as $item) { foreach ($result->item as $item) {
@ -1654,7 +1654,7 @@ class SaisieController extends Zend_Controller_Action
$mode = $request->getParam('mode', null); $mode = $request->getParam('mode', null);
$this->view->assign('mode', $mode); $this->view->assign('mode', $mode);
Zend_Registry::get('firebug')->info($mode); $this->logger->info($mode);
if ($mode === null) { if ($mode === null) {
$this->_helper->layout()->disableLayout(); $this->_helper->layout()->disableLayout();
@ -1809,7 +1809,7 @@ class SaisieController extends Zend_Controller_Action
'bilEE' => $params['bilEE'], 'bilEE' => $params['bilEE'],
); );
Zend_Registry::get('firebug')->info($params); $this->logger->info($params);
$ws = new WsScores(); $ws = new WsScores();
$idNewLien = $ws->setLienRef(json_encode($infos), $params['idLien']); $idNewLien = $ws->setLienRef(json_encode($infos), $params['idLien']);
@ -1884,7 +1884,7 @@ class SaisieController extends Zend_Controller_Action
} }
} }
} }
Zend_Registry::get('firebug')->info($infos); $this->logger->info($infos);
$idNewLien = $ws->setLien(json_encode($infos), $params['idLien']); $idNewLien = $ws->setLien(json_encode($infos), $params['idLien']);
@ -2147,7 +2147,7 @@ class SaisieController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$result = $ws->getIdentite($siren); $result = $ws->getIdentite($siren);
Zend_Registry::get('firebug')->info($result); $this->logger->info($result);
$this->view->assign('nom',$result->Nom); $this->view->assign('nom',$result->Nom);
$this->view->assign('sigle',$result->sigle); $this->view->assign('sigle',$result->sigle);
@ -2218,8 +2218,8 @@ class SaisieController extends Zend_Controller_Action
$items = json_decode($result, true); $items = json_decode($result, true);
if ( $items!==null ) { if ( $items!==null ) {
Zend_Registry::get('firebug')->info('getSaisieLienRef id='.$id); $this->logger->info('getSaisieLienRef id='.$id);
Zend_Registry::get('firebug')->info($items); $this->logger->info($items);
//Get country code //Get country code
if ($items->adresse_pays!='FRA') { if ($items->adresse_pays!='FRA') {
@ -2227,7 +2227,7 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('identifiant', $result->item); $this->view->assign('identifiant', $result->item);
} }
Zend_Registry::get('firebug')->info($items); $this->logger->info($items);
if (count($items)>0) { if (count($items)>0) {
foreach( $items as $key => $val ) { foreach( $items as $key => $val ) {
@ -2352,7 +2352,7 @@ class SaisieController extends Zend_Controller_Action
$result = $ws->setLienRef(json_encode($infos), $id); $result = $ws->setLienRef(json_encode($infos), $id);
$message = ($result == 1)?'Fiche supprimée':'Erreur de suppression'; $message = ($result == 1)?'Fiche supprimée':'Erreur de suppression';
} }
Zend_Registry::get('firebug')->info($checkLiens->participations->item); $this->logger->info($checkLiens->participations->item);
$this->view->assign('message', $message); $this->view->assign('message', $message);
} }
} else { } else {
@ -2719,7 +2719,7 @@ class SaisieController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$result = $ws->getSaisieContactEt($id); $result = $ws->getSaisieContactEt($id);
$data = json_decode($result, true); $data = json_decode($result, true);
Zend_Registry::get('firebug')->info($data); $this->logger->info($data);
$this->view->assign('id', $data['id']); $this->view->assign('id', $data['id']);
$this->view->assign('siret', str_pad($data['siren'],9,'0',STR_PAD_LEFT).str_pad($data['nic'],5,'0',STR_PAD_LEFT)); $this->view->assign('siret', str_pad($data['siren'],9,'0',STR_PAD_LEFT).str_pad($data['nic'],5,'0',STR_PAD_LEFT));
$this->view->assign('type', $data['typeTel']); $this->view->assign('type', $data['typeTel']);
@ -2876,7 +2876,7 @@ class SaisieController extends Zend_Controller_Action
if ( $request->isXmlHttpRequest() ) { if ( $request->isXmlHttpRequest() ) {
$this->_helper->layout()->disableLayout(); $this->_helper->layout()->disableLayout();
} }
Zend_Registry::get('firebug')->info($request->getParams()); $this->logger->info($request->getParams());
$mode = $request->getParam('mode'); $mode = $request->getParam('mode');
// --- Diplay form to re-validate geocode // --- Diplay form to re-validate geocode

View File

@ -249,7 +249,7 @@ class SurveillanceController extends Zend_Controller_Action
$filtre->detail = false; $filtre->detail = false;
$infos = $ws->getSurveillances($filtre); $infos = $ws->getSurveillances($filtre);
Zend_Registry::get('firebug')->info($infos); $this->logger->info($infos);
if (property_exists($infos->result, 'item') && count($infos->result->item)>0) { if (property_exists($infos->result, 'item') && count($infos->result->item)>0) {
$titre = 'Ajouter une surveillance'; $titre = 'Ajouter une surveillance';

View File

@ -268,7 +268,7 @@ class TelechargementController extends Zend_Controller_Action
$authinfo = '/login/'.$identity->username.'/hach/'.$identity->password; $authinfo = '/login/'.$identity->username.'/hach/'.$identity->password;
$url = $host.$authinfo.'/q/'.$q; $url = $host.$authinfo.'/q/'.$q;
Zend_Registry::get('firebug')->info($url); $this->logger->info($url);
$file = $this->getFile($url, uniqid('histo-').'.pdf'); $file = $this->getFile($url, uniqid('histo-').'.pdf');
@ -311,9 +311,9 @@ class TelechargementController extends Zend_Controller_Action
//Téléchargement //Téléchargement
if( $url !== false) { if( $url !== false) {
Zend_Registry::get('firebug')->info($url); $this->logger->info($url);
$file = $this->getFile($url); $file = $this->getFile($url);
Zend_Registry::get('firebug')->info('File:'.$this->path.'/'.$file); $this->logger->info('File:'.$this->path.'/'.$file);
// --- En attente // --- En attente
if ( $file === null ) { if ( $file === null ) {
echo ''; echo '';

View File

@ -101,10 +101,10 @@ class UserController extends Zend_Controller_Action
$options['profil'] = 'Utilisateur'; $options['profil'] = 'Utilisateur';
} }
$ws = new WsScores(); $ws = new WsScores();
Zend_Registry::get('firebug')->info('setInfosLogin'); $this->logger->info('setInfosLogin');
Zend_Registry::get('firebug')->info($options); $this->logger->info($options);
$reponse = $ws->setInfosLogin($login, $action, $options); $reponse = $ws->setInfosLogin($login, $action, $options);
Zend_Registry::get('firebug')->info($response); $this->logger->info($response);
$isProfilUpdated = true; $isProfilUpdated = true;
$message = 'Erreur lors de la mise à jour du compte !'; $message = 'Erreur lors de la mise à jour du compte !';
@ -487,7 +487,7 @@ class UserController extends Zend_Controller_Action
//Auth error //Auth error
else { else {
$this->view->message = ''; $this->view->message = '';
Zend_Registry::get('firebug')->info($result); $this->logger->info($result);
foreach ($result->getMessages() as $message) { foreach ($result->getMessages() as $message) {
$this->view->message.= $message."<br/>"; $this->view->message.= $message."<br/>";
} }
@ -496,7 +496,7 @@ class UserController extends Zend_Controller_Action
} }
// Pas de validation du formulaire // Pas de validation du formulaire
else { else {
Zend_Registry::get('firebug')->info('DISPLAY'); $this->logger->info('DISPLAY');
} }
} }