issue #0001300 : Modification requetes et intégration extranet

This commit is contained in:
Michael RICOIS 2012-08-16 11:37:59 +00:00
parent d7bec281b7
commit d0913132ef
3 changed files with 17 additions and 10 deletions

View File

@ -630,10 +630,9 @@ class DashboardController extends Zend_Controller_Action
$this->view->assign('options', $options);
//Customer informations
$reponse = $ws->getListeClients($idClient);
$InfosClient = $reponse->result->item[0];
$this->view->assign('loginNew', $InfosClient->racineLogin);
$this->view->assign('droitsClients', explode(' ', strtolower($InfosClient->droits)));
$reponse = $ws->getNextLogin($idClient);
$this->view->assign('loginNew', $reponse->result->racine);
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
$this->view->assign('password', $this->randomPassword(10, 3));

View File

@ -171,7 +171,7 @@ class UserController extends Zend_Controller_Action
if ($idClient == '') {
$idClient = $identity->idClient;
}
$reponse = $ws->getNextLogin($identity->username);
$reponse = $ws->getNextLogin($idClient);
$options->idClient = $idClient;
if ($identity->idClient!=1 && $identity->profil!='SuperAdministrateur') {
$options->profil = 'Utilisateur';

View File

@ -129,7 +129,7 @@ class WsScores
return $reponse->getKbisResult;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('0000', 'MSG')) ){
Zend_Registry::get('firebug')->info($fault);
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
@ -1722,18 +1722,20 @@ class WsScores
/**
* getNextLogin
* @param unknown_type $login
* @param int $idClient
*/
public function getNextLogin($login)
public function getNextLogin($idClient)
{
$params = new stdClass();
$params->login = $login;
$params->idClient = $idClient;
try {
$client = $this->loadClient('gestion');
$reponse = $client->getNextLogin($params);
Zend_Registry::get('firebug')->info($reponse);
return $reponse->getNextLoginResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
Zend_Registry::get('firebug')->info($fault);
//Placer exception pour affichage message
return false;
}
@ -1841,7 +1843,13 @@ class WsScores
}
$options['trace'] = true;
$options['encoding'] = 'utf-8';
$client = new SoapClient($wsdl, $options);
$client = false;
try {
$client = new SoapClient($wsdl, $options);
} catch (Exception $e) {
Zend_Registry::get('firebug')->info($e->getMessage());
throw new Exception('Application Error');
}
return $client;
}
}