diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index 465608218..d7bebe762 100644 --- a/application/controllers/IndexController.php +++ b/application/controllers/IndexController.php @@ -44,11 +44,13 @@ class IndexController extends Zend_Controller_Action $ws = new WsScores(); $reponse = $ws->getPortefeuilleCsv($login, $idClient); + $log = Zend_Registry::get('configuration')->path->data.'/log/altisys.log'; + if ($reponse === false){ - file_put_contents('altisys.log', date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND); + file_put_contents($log, date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND); echo "Erreur"; } elseif (!empty($reponse->result->Url)) { - file_put_contents('altisys.log', date('Y-m-d H:i:s')." - URL = ".$reponse->result->Url."\n", FILE_APPEND); + file_put_contents($log, date('Y-m-d H:i:s')." - URL = ".$reponse->result->Url."\n", FILE_APPEND); echo $reponse->result->Url; } } diff --git a/public/index_portefeuillecsv.php b/public/index_portefeuillecsv.php index 5ba41cb1f..32aaa1491 100644 --- a/public/index_portefeuillecsv.php +++ b/public/index_portefeuillecsv.php @@ -19,7 +19,5 @@ if (!empty($login) && !empty($hach)){ $url = $url.'?'.$login.'&'.$hach; } -file_put_contents('altisys.log', date('Y-m-d H:i:s')." - Connexion ".$_REQUEST['login']."\n", FILE_APPEND); - header( "Location: $url" ); exit; \ No newline at end of file