Pour eviter les erreurs lors de la vérification de la session

This commit is contained in:
Michael RICOIS 2011-10-26 10:34:32 +00:00
parent df91132190
commit b70dc8e204
5 changed files with 9 additions and 9 deletions

View File

@ -114,7 +114,7 @@ class EvaluationController extends Zend_Controller_Action
$siren = substr($this->siret,0,9); $siren = substr($this->siret,0,9);
$ws = new WsScores(); $ws = new WsScores();
$entreprise = new SessionEntreprise($this->siret); $entreprise = new SessionEntreprise($this->siret, $this->id);
$identite = $ws->getIdentite($siren); $identite = $ws->getIdentite($siren);
$indiscore = $ws->getIndiScore($siren); $indiscore = $ws->getIndiScore($siren);
$infos = $ws->getRatios($siren, 'indiscore2'); // @todo : vérifier la page $infos = $ws->getRatios($siren, 'indiscore2'); // @todo : vérifier la page
@ -644,7 +644,7 @@ class EvaluationController extends Zend_Controller_Action
if (!empty($companyname)) { if (!empty($companyname)) {
$this->view->raisonSociale = $companyname; $this->view->raisonSociale = $companyname;
} else { } else {
$session = new SessionEntreprise($this->siret); $session = new SessionEntreprise($this->siret, $this->id);
$this->view->raisonSociale = $session->getRaisonSociale(); $this->view->raisonSociale = $session->getRaisonSociale();
} }
$this->view->emailCommande = $utilisateur->getEmail(); $this->view->emailCommande = $utilisateur->getEmail();

View File

@ -33,7 +33,7 @@ class FinanceController extends Zend_Controller_Action
public function syntheseAction() public function syntheseAction()
{ {
$user = new Utilisateur(); $user = new Utilisateur();
$session = new SessionEntreprise($this->siret); $session = new SessionEntreprise($this->siret, $this->id);
$request = $this->getRequest(); $request = $this->getRequest();
$typeBilan = $request->getParam('typeBilan', 'N'); $typeBilan = $request->getParam('typeBilan', 'N');

View File

@ -148,7 +148,7 @@ class JuridiqueController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$idCom = $request->getParam('idCom', false); $idCom = $request->getParam('idCom', false);
$siren = substr($this->siret, 0,9); $siren = substr($this->siret, 0,9);
$session = new SessionEntreprise($this->siret); $session = new SessionEntreprise($this->siret, $this->id);
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getInfosReg($siren); $infos = $ws->getInfosReg($siren);
@ -234,7 +234,7 @@ class JuridiqueController extends Zend_Controller_Action
public function conventionsAction() public function conventionsAction()
{ {
$siren = substr($this->siret, 0,9); $siren = substr($this->siret, 0,9);
$session = new SessionEntreprise($this->siret); $session = new SessionEntreprise($this->siret, $this->id);
$this->view->assign('siren', $siren); $this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret); $this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale()); $this->view->assign('raisonSociale', $session->getRaisonSociale());
@ -256,7 +256,7 @@ class JuridiqueController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$idObject = $request->getParam('idObject', 0); $idObject = $request->getParam('idObject', 0);
$siren = substr($this->siret, 0,9); $siren = substr($this->siret, 0,9);
$session = new SessionEntreprise($this->siret); $session = new SessionEntreprise($this->siret, $this->id);
$this->view->assign('siren', $siren); $this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret); $this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale()); $this->view->assign('raisonSociale', $session->getRaisonSociale());

View File

@ -623,7 +623,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('siret', $this->siret); $this->view->assign('siret', $this->siret);
$this->view->assign('siren', $this->siren); $this->view->assign('siren', $this->siren);
$session = new SessionEntreprise($this->siret); $session = new SessionEntreprise($this->siret, $this->id);
$this->view->assign('raisonSociale', $session->getRaisonSociale()); $this->view->assign('raisonSociale', $session->getRaisonSociale());
} }

View File

@ -8,10 +8,10 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
public function postDispatch(Zend_Controller_Request_Abstract $request) public function postDispatch(Zend_Controller_Request_Abstract $request)
{ {
$siret = $request->getParam('siret', null); $siret = $request->getParam('siret', null);
$id = $request->getParam('id', null); $id = $request->getParam('id', 0);
if (empty($siret) && empty($id)) { if (empty($siret) && empty($id)) {
require_once 'Scores/SessionEntreprise.php'; require_once 'Scores/SessionEntreprise.php';
$session = new SessionEntreprise($siret); $session = new SessionEntreprise($siret, $id);
$siret = $session->getSiret(); $siret = $session->getSiret();
$id = $session->getId(); $id = $session->getId();
} }