ajout du lien de unset des sessions

This commit is contained in:
Damien LASSERRE 2011-12-14 16:28:33 +00:00
parent 7e64f46535
commit 953e655f7d
5 changed files with 12 additions and 10 deletions

View File

@ -10,6 +10,12 @@ class IndexController extends Zend_Controller_Action
//Liste des fichiers d'extraction
public function historiqueAction(){}
public function resetAction()
{ $session = new Zend_Session_Namespace('ciblage');
unset($session->ciblage);
$this->_redirect('./');
}
}

View File

@ -24,7 +24,9 @@
</p>
<label>Avec Téléphone</label><input value="1" class="criteres" type="checkbox" name="tel"/>
</p>
</p>
<label>Avec Fax</label><input value="1" class="criteres" type="checkbox" name="fax"/>
</p>
<p>
<label>Date de création Entreprise: </label>
<input type="text" name="dateCrea_ent1" /> <input type="text" name="dateCrea_ent2" /> <a class="interval" id="dateCrea_ent" href="">Valider</a>

View File

@ -1 +1 @@
<?php
<a href="/index/reset">Vider la session</a>

View File

@ -10,7 +10,6 @@ Class Ciblage
public function __construct($structure, $need = false)
{
//print_r($structure);exit;
$this->sphinx = new SphinxClient();
$this->sphinx->SetServer(ConfigurationCiblage::$sphinx_host, ConfigurationCiblage::$sphinx_port);
$this->sphinx->SetMatchMode(SPH_MATCH_EXTENDED2);

View File

@ -18,12 +18,7 @@ class SessionCiblage
protected function setSession()
{
$session = new Zend_Session_Namespace('ciblage');
if($session->isLocked()) {
$session->unlock();
$session->ciblage = $this->valeur;
$session->lock();
}
$session->ciblage = $this->valeur;
}
public function getSession()
@ -34,7 +29,7 @@ class SessionCiblage
public function setCritere($key, $value)
{
if(in_array($key, $this->criteres)) {
$this->valeur[$key] = intval($value);
$this->valeur[$key] = $value;
$this->setSession();
}
}