| Line 33... |
Line 33... |
| 33 |
protected $ns_referentiel;
|
33 |
protected $ns_referentiel;
|
| 34 |
/** mot-clé associé aux saisies, et template personnalisé si appliquable */
|
34 |
/** mot-clé associé aux saisies, et template personnalisé si appliquable */
|
| 35 |
protected $projet = null;
|
35 |
protected $projet = null;
|
| 36 |
protected $configProjet = null;
|
36 |
protected $configProjet = null;
|
| 37 |
protected $configMission = null;
|
37 |
protected $configMission = null;
|
| - |
|
38 |
protected $mission = null;
|
| 38 |
/** langue (traduction), charge un template de la forme "defaut_en.tpl.html" */
|
39 |
/** langue (traduction), charge un template de la forme "defaut_en.tpl.html" */
|
| 39 |
protected $langue = null;
|
40 |
protected $langue = null;
|
| Line 40... |
Line 41... |
| 40 |
|
41 |
|
| 41 |
/**
|
42 |
/**
|
| Line 105... |
Line 106... |
| 105 |
protected function chargerConfigProjet() {
|
106 |
protected function chargerConfigProjet() {
|
| 106 |
$fichier_config = dirname(__FILE__).self::DS.'configurations'.self::DS.$this->projet.'.ini';
|
107 |
$fichier_config = dirname(__FILE__).self::DS.'configurations'.self::DS.$this->projet.'.ini';
|
| 107 |
if (file_exists($fichier_config)) {
|
108 |
if (file_exists($fichier_config)) {
|
| 108 |
if ($this->configProjet = parse_ini_file($fichier_config, true)) {
|
109 |
if ($this->configProjet = parse_ini_file($fichier_config, true)) {
|
| 109 |
if (isset($_GET['mission'])) {
|
110 |
if (isset($_GET['mission'])) {
|
| 110 |
$mission = strtolower(trim($_GET['mission']));
|
111 |
$this->mission = strtolower(trim($_GET['mission']));
|
| 111 |
if (isset($this->configProjet[$mission])) {
|
112 |
if (isset($this->configProjet[$this->mission])) {
|
| 112 |
$this->configMission = $this->configProjet[$mission];
|
113 |
$this->configMission = $this->configProjet[$this->mission];
|
| 113 |
}
|
114 |
}
|
| 114 |
}
|
115 |
}
|
| 115 |
} else {
|
116 |
} else {
|
| 116 |
$this->messages[] = "Le fichier de configuration '$fichier_config' n'a pu être chargé.";
|
117 |
$this->messages[] = "Le fichier de configuration '$fichier_config' n'a pu être chargé.";
|
| 117 |
}
|
118 |
}
|
| Line 148... |
Line 149... |
| 148 |
$widget['donnees']['url_ws_annuaire'] = sprintf($this->config['chemins']['baseURLServicesAnnuaireTpl'], 'utilisateur/identite-par-courriel/');
|
149 |
$widget['donnees']['url_ws_annuaire'] = sprintf($this->config['chemins']['baseURLServicesAnnuaireTpl'], 'utilisateur/identite-par-courriel/');
|
| 149 |
$widget['donnees']['url_remarques'] = $this->config['chemins']['widgetRemarquesUrl'];
|
150 |
$widget['donnees']['url_remarques'] = $this->config['chemins']['widgetRemarquesUrl'];
|
| Line 150... |
Line 151... |
| 150 |
|
151 |
|
| 151 |
$widget['donnees']['logo'] = isset($_GET['logo']) ? $_GET['logo'] : 'defaut';
|
152 |
$widget['donnees']['logo'] = isset($_GET['logo']) ? $_GET['logo'] : 'defaut';
|
| - |
|
153 |
$widget['donnees']['titre'] = $this->getTitrePage();
|
| Line 152... |
Line 154... |
| 152 |
$widget['donnees']['titre'] = $this->getTitrePage();
|
154 |
$widget['donnees']['nom_mission'] = $this->getNomMissionFlore();
|
| 153 |
|
155 |
|
| 154 |
$widget['donnees']['referentiel_impose'] = $referentiel_impose;
|
156 |
$widget['donnees']['referentiel_impose'] = $referentiel_impose;
|
| 155 |
$widget['donnees']['espece_imposee'] = false;
|
157 |
$widget['donnees']['espece_imposee'] = false;
|
| Line 212... |
Line 214... |
| 212 |
}
|
214 |
}
|
| 213 |
return $titre;
|
215 |
return $titre;
|
| 214 |
}
|
216 |
}
|
| Line 215... |
Line 217... |
| 215 |
|
217 |
|
| - |
|
218 |
/**
|
| - |
|
219 |
* Un nom un peu plus sympatoche à afficher que juste le mot-clef associé; s'il
|
| - |
|
220 |
* n'est pas défini dans la config, on prend le mot-clef tout de même
|
| - |
|
221 |
*/
|
| - |
|
222 |
protected function getNomMissionFlore() {
|
| - |
|
223 |
$nom = $this->mission;
|
| - |
|
224 |
if (isset($this->configMission['nom_mission'])) {
|
| - |
|
225 |
$nom = $this->configMission['nom_mission'];
|
| - |
|
226 |
}
|
| - |
|
227 |
return $nom;
|
| - |
|
228 |
}
|
| - |
|
229 |
|
| 216 |
/**
|
230 |
/**
|
| 217 |
* Remplit un fichier JS avec une variable contenant une liste restreinte de taxons,
|
231 |
* Remplit un fichier JS avec une variable contenant une liste restreinte de taxons,
|
| 218 |
* pour certains projets
|
232 |
* pour certains projets
|
| 219 |
* @return string
|
233 |
* @return string
|
| 220 |
*/
|
234 |
*/
|