ajout du lien de unset des sessions
This commit is contained in:
parent
7e64f46535
commit
953e655f7d
@ -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('./');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
|
@ -1 +1 @@
|
||||
<?php
|
||||
<a href="/index/reset">Vider la session</a>
|
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user