57,7 → 57,7 |
$mime = null; |
if (is_array($retour) && array_key_exists('squelette', $retour)) { |
$ext = (isset($retour['squelette_ext'])) ? $retour['squelette_ext'] : '.tpl.html'; |
if($this->projetASquelette()) { |
if ($this->projetASquelette()) { |
$squelette = dirname(__FILE__).self::DS.'squelettes'.self::DS.$this->projet.self::DS.$retour['squelette'].$ext; |
} else { |
$squelette = dirname(__FILE__).self::DS.'squelettes'.self::DS.'defaut'.self::DS.'defaut'.$ext; |
112,14 → 112,12 |
$widget['donnees']['url_ws_annuaire'] = sprintf($this->config['chemins']['baseURLServicesAnnuaireTpl'], 'utilisateur/identite-par-courriel/'); |
$widget['donnees']['url_remarques'] = $this->config['chemins']['widgetRemarquesUrl']; |
|
|
$widget['donnees']['logo'] = isset($_GET['logo']) ? $_GET['logo'] : 'defaut'; |
$widget['donnees']['titre'] = isset($_GET['titre']) ? $_GET['titre'] : 'defaut'; |
$widget['donnees']['titre'] = ($widget['donnees']['titre'] == '0') ? '' : $widget['donnees']['titre']; |
|
// cas du projet par défaut ou bien d'un projet n'ayant pas de squelette spécifique |
$projetsAutorises = array('defaut', 'ambrosia', 'arbres-tetards', 'florileges', 'sauvages'); |
if (in_array($this->projet, $projetsAutorises) || !$this->projetASquelette()) { |
$projetsAutorises = $this->transformerEnTableau($this->config['projets']['autorises']); |
if (in_array($this->projet, $projetsAutorises)) { |
$urlWsNsTpl = $this->config['chemins']['baseURLServicesEfloreTpl']; |
$urlWsNs = sprintf($urlWsNsTpl, self::EFLORE_API_VERSION, $this->NS_PROJET, self::WS_NOM); |
$urlWsNsSansRef = sprintf($urlWsNsTpl, self::EFLORE_API_VERSION, '{referentiel}', self::WS_NOM); |
144,15 → 142,24 |
$widget['donnees']['infos_espece'] = $this->array2js($nom, true); |
} |
} |
if ($this->projet != 'defaut' || $this->projetASquelette()) { |
if ($this->projet == 'florileges' || $this->projet == 'sauvages' || $this->projet == 'arbres-tetards') { |
|
$projetsAListeDeNoms = $this->transformerEnTableau($this->config['projets']['liste_noms']); |
if (in_array($this->projet, $projetsAListeDeNoms)) { |
$projetsAListeDeNomsSciEtVerna = $this->transformerEnTableau($this->config['projets']['liste_noms_sci_et_verna']); |
if (in_array($this->projet, $projetsAListeDeNomsSciEtVerna)) { |
$widget['donnees']['taxons'] = $this->recupererListeNoms(); |
} else { |
$widget['donnees']['taxons'] = $this->recupererListeNomsSci(); |
} |
} |
|
// Chargement de la liste des milieux issues du fichier .ini du projet |
$projetsAListeDeMilieux = $this->transformerEnTableau($this->config['projets']['liste_milieux']); |
if (in_array($this->projet, $projetsAListeDeMilieux)) { |
$widget['donnees']['milieux'] = $this->parserMilieux(); |
} |
return $widget; |
|
return $widget; |
} |
|
private function projetASquelette() { |