Update from branch 1.3
This commit is contained in:
commit
5a0e66d59f
@ -22,13 +22,16 @@ class ErrorController extends Zend_Controller_Action
|
||||
break;
|
||||
}
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
|
||||
//Envoyer les erreurs par mail
|
||||
$message = '';
|
||||
$message.= 'Erreur Applicative : ';
|
||||
$message.= "\n";
|
||||
$message.= 'Message : '.$errors->exception->getMessage();
|
||||
$message.= "\n";
|
||||
$message.= 'Utilisateur : '.$user->getLogin();
|
||||
$message.= 'Utilisateur : '.$identity->login;
|
||||
$message.= "\n";
|
||||
$message.= "File :".$errors->exception->getFile().", Ligne : ".$errors->exception->getLine();
|
||||
$message.= "\n";
|
||||
@ -38,7 +41,8 @@ class ErrorController extends Zend_Controller_Action
|
||||
|
||||
$message.= "Referer : ".$_SERVER['HTTP_REFERER']."\n";
|
||||
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
require_once 'Scores/Mail.php';
|
||||
$mail = new Mail();
|
||||
$mail->setSubject('[ERREUR APPLICATIVE] - '.$configuration->server->name.' -'.date('Ymd'));
|
||||
$mail->setBodyTexte($message);
|
||||
|
@ -71,25 +71,12 @@ class GestionController extends Zend_Controller_Action
|
||||
$params['criteres'] = json_decode($profilClient->current()->criteres,true);
|
||||
}
|
||||
|
||||
$dataInsee = 0;
|
||||
// Est ce qu'il existe une donnée insee
|
||||
require_once 'Scores/Enrichissement.php';
|
||||
$fieldsM = new Enrichissement();
|
||||
$fields = $fieldsM->getFields();
|
||||
foreach ( $fields as $key => $val) {
|
||||
if ( array_key_exists('insee', $val) && $val['insee']===true) {
|
||||
$dateInsee = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'idClient' => $params['idClient'],
|
||||
'service' => $params['service'],
|
||||
'login' => $params['login'],
|
||||
'reference' => $params['reference'],
|
||||
'criteres' => json_encode($params['criteres']),
|
||||
'dataInsee' => $dataInsee,
|
||||
'dateAjout' => date('Y-m-d H:i:s'),
|
||||
'actif' => 1,
|
||||
);
|
||||
@ -278,12 +265,13 @@ class GestionController extends Zend_Controller_Action
|
||||
|
||||
if ($idClient !== null) {
|
||||
$paramsM = new Application_Model_CustomerParams();
|
||||
$params = $paramsM->find($idClient);
|
||||
$sql = $paramsM->select()->where('idClient = ?', $idClient);
|
||||
$params = $paramsM->fetchRow($sql);
|
||||
$infos = null;
|
||||
if ($params->count()>0){
|
||||
if ($params!==null){
|
||||
$infos = $params->toArray();
|
||||
}
|
||||
$this->view->assign('infos',$infos[0]);
|
||||
$this->view->assign('infos',$infos);
|
||||
|
||||
$loginsM = new Application_Model_EnrichissementProfils();
|
||||
$sql = $loginsM->select()->where('idClient = ?', $idClient);
|
||||
|
@ -25,22 +25,23 @@ $('#dialog').dialog({
|
||||
buttons: [ {
|
||||
text: "Enregistrer",
|
||||
click: function() {
|
||||
var options = {
|
||||
target: '#result',
|
||||
dataType: 'json',
|
||||
beforeSubmit: function(){},
|
||||
success: function(data){
|
||||
if (data.error == 0) {
|
||||
$('#result').html(data.msg);
|
||||
//@todo : Voir
|
||||
$(location).attr('href',data.href);
|
||||
} else {
|
||||
$('#result span.message').html(data.msg);
|
||||
}
|
||||
}
|
||||
};
|
||||
$('form#save').ajaxSubmit(options);
|
||||
}
|
||||
$('#result').html('Enregistrement...');
|
||||
var options = {
|
||||
target: '#result',
|
||||
dataType: 'json',
|
||||
beforeSubmit: function(){},
|
||||
success: function(data){
|
||||
if (data.error == 0) {
|
||||
$('#result').html(data.msg);
|
||||
//@todo : Voir
|
||||
$(location).attr('href',data.href);
|
||||
} else {
|
||||
$('#result span.message').html(data.msg);
|
||||
}
|
||||
}
|
||||
};
|
||||
$('form#save').ajaxSubmit(options);
|
||||
}
|
||||
},
|
||||
{ text: "Annuler", click: function() { $(this).dialog("close"); } }
|
||||
] });
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
<?php if ( is_array($criteres['in']) && count($criteres['in'])>0 ) { ?>
|
||||
<div>
|
||||
<p>Inclu :</p>
|
||||
<p>Inclus :</p>
|
||||
<?php foreach( $criteres['in'] as $item ) {?>
|
||||
<p><?=$item?></p>
|
||||
<?php }?>
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
<?php if ( is_array($criteres['ex']) && count($criteres['ex'])>0 ) { ?>
|
||||
<div>
|
||||
<p>Exclu :</p>
|
||||
<p>Exclus :</p>
|
||||
<?php foreach( $criteres['ex'] as $item ) {?>
|
||||
<p><?=$item?></p>
|
||||
<?php }?>
|
||||
|
@ -54,13 +54,13 @@ Vos critères seront enregistrées et une référence vous sera fourni.</p>
|
||||
<input type="hidden" type="text" value="<?=$this->ref?>" name="ref">
|
||||
<input type="hidden" type="text" value="<?=$this->profil?>" name="profil">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$('#dialog').dialog({ buttons: [ {
|
||||
text: "Commander",
|
||||
click: function() {
|
||||
$('div#update').html('Enregistrement...');
|
||||
$('#dialog').dialog({ buttons: [{}] });
|
||||
$('#cache').css('display', 'none');
|
||||
var url = '/dashboard/ciblage/id/<?=$this->id?>';
|
||||
var ok = false;
|
||||
$.post($('form[name=commande]').attr('action'),$('form[name=commande]').serialize(),
|
||||
@ -80,5 +80,4 @@ $('#dialog').dialog({ buttons: [ {
|
||||
}
|
||||
] });
|
||||
</script>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
@ -68,4 +68,6 @@ elseif(isset($opts->install))
|
||||
|
||||
//Modification des permissions
|
||||
passthru('chown -R www-data: '.APPLICATION_PATH.'/../');
|
||||
passthru('chmod -x '.APPLICATION_PATH.'/../batch/cron.php');
|
||||
passthru('chmod -x '.APPLICATION_PATH.'/../batch/enrichissement.php');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user