Ajout des valeurs pas defaut mix max contenues dans la base local
This commit is contained in:
parent
af568d45d2
commit
9a70310c6a
@ -776,43 +776,30 @@ Class Fields
|
|||||||
{
|
{
|
||||||
require_once('Scores/SessionCiblage.php');
|
require_once('Scores/SessionCiblage.php');
|
||||||
$session = new SessionCiblage();
|
$session = new SessionCiblage();
|
||||||
|
$auth = Zend_Auth::getInstance();
|
||||||
|
$user = $auth->getIdentity();
|
||||||
|
$db = Zend_Registry::get('db');
|
||||||
|
|
||||||
$auth = Zend_Auth::getInstance();
|
|
||||||
$user = $auth->getIdentity();
|
|
||||||
|
|
||||||
$db = Zend_Registry::get('db');
|
|
||||||
/*$prefsModel = new Application_Model_Prefs($db);
|
|
||||||
|
|
||||||
$prefs = $prefsModel->find($login);
|
|
||||||
$json = $prefs->json;*/
|
|
||||||
|
|
||||||
foreach($this->fields as $name => $valeur) {
|
foreach($this->fields as $name => $valeur) {
|
||||||
/*if(!empty($json))
|
if($this->fields[$name]['type'] == 'interval') {
|
||||||
{
|
$minmax = $this->getMinMax($name);
|
||||||
$prefs = json_decode($json);
|
$this->fields[$name]['fields'][$this->fields['type']]['value']
|
||||||
if(!empty($prefs)) {
|
= array($minmax[0]['min'], $minmax[0]['max']);
|
||||||
if(array_key_exists($name, $prefs)) {
|
}
|
||||||
$this->fields[$name]['activated'] = false;
|
|
||||||
if(is_array($this->fields[$name]['type'])) {
|
|
||||||
$this->fields[$name]['type'] = $prefs[$name];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
/*if(in_array($name, $this->requeteSql)) {
|
|
||||||
$formeJuridiques = new Application_Model_Formejuridique();
|
|
||||||
$sql = $formeJuridiques->select()->where('fjCode > 1000');
|
|
||||||
$formeJuridiques = $formeJuridiques->fetchAll($sql)->toArray();
|
|
||||||
$value = array();
|
|
||||||
foreach($formeJuridiques as $form) {
|
|
||||||
$value[$form['fjCode']] = $form['fjLibelle'].' ['.$form['fjCode'].']';
|
|
||||||
}
|
|
||||||
asort($value);
|
|
||||||
$this->fields[$name]['fields']['select']['value'] = $value;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static public function getMinMax($name)
|
||||||
|
{
|
||||||
|
$tab = array('dateCrea_ent','dateCrea_etab');
|
||||||
|
if(!in_array($name, $tab)) {
|
||||||
|
$table = new Table_Minmaxs();
|
||||||
|
return ($table->fetchAll($table->select()->where('cle = ?', $name))->toArray());
|
||||||
|
}
|
||||||
|
return (array());
|
||||||
|
}
|
||||||
|
|
||||||
public function getFields() {
|
public function getFields() {
|
||||||
return ($this->fields);
|
return ($this->fields);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user