From d2b17e2ff7468dc20eff33eee6f65643d95d05d8 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 25 Jan 2013 08:02:02 +0000 Subject: [PATCH] issue #0001350 : Init doublon --- application/controllers/ProfilController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/controllers/ProfilController.php b/application/controllers/ProfilController.php index 8fc9f175..39641aae 100644 --- a/application/controllers/ProfilController.php +++ b/application/controllers/ProfilController.php @@ -36,7 +36,8 @@ class ProfilController extends Zend_Controller_Action public function createAction() { $request = $this->getRequest(); - $id = $request->getParam('id', null); + $id = $request->getParam('id', null); + $doublon = array(); require_once 'Scores/Enrichissement.php'; $data = new Enrichissement(); @@ -45,11 +46,9 @@ class ProfilController extends Zend_Controller_Action $profilM = new Application_Model_Profil(); $profil = $profilM->find($id); $criteres = json_decode($profil->current()->criteres, true); - $doublon = array(); if( $profil->current()->doublon!='' ) { $doublon = json_decode($profil->current()->doublon, true); - } - $this->view->assign('doublon', $doublon); + } $tmp = array(); foreach ($criteres as $critere) { $values = false; @@ -74,6 +73,7 @@ class ProfilController extends Zend_Controller_Action $this->view->assign('criteres', $tmp); $this->view->assign('reference', $profil->current()->reference); } + $this->view->assign('doublon', $doublon); $this->view->assign('id', $id); $this->view->assign('edit', true); $this->view->assign('elements', $data->getDico());