| Line 158... |
Line 158... |
| 158 |
if (isset($tableau['motscles'])) {
|
158 |
if (isset($tableau['motscles'])) {
|
| 159 |
$tableau['tag-obs'] = $tableau['tag-img'] = $tableau['motscles'];
|
159 |
$tableau['tag-obs'] = $tableau['tag-img'] = $tableau['motscles'];
|
| 160 |
}
|
160 |
}
|
| 161 |
$tableau['chpSupp'] = $tab;
|
161 |
$tableau['chpSupp'] = $tab;
|
| 162 |
$langue_projet_url = ( isset ( $this->parametres['langue'] ) && $this->parametres['langue'] !== 'fr' ) ? '_' . $this->parametres['langue'] : '';
|
162 |
$langue_projet_url = ( isset ( $this->parametres['langue'] ) && $this->parametres['langue'] !== 'fr' ) ? '_' . $this->parametres['langue'] : '';
|
| 163 |
$tableau['chemin_fichiers'] = sprintf( $this->config['chemins']['baseURLAbsoluDyn'], $this->config['manager']['dossierTmp'] . $tableau['projet'] . $langue_projet_url . '/' );
|
163 |
$tableau['chemin_fichiers'] = sprintf( $this->config['chemins']['baseURLAbsoluDyn'], $this->config['manager']['imgProjet'] . $tableau['projet'] . $langue_projet_url . '/' );
|
| 164 |
return $tableau;
|
164 |
return $tableau;
|
| 165 |
}
|
165 |
}
|
| Line 166... |
Line 166... |
| 166 |
|
166 |
|
| 167 |
/* Recherche si un projet a des champs de saisie supplémentaire */
|
167 |
/* Recherche si un projet a des champs de saisie supplémentaire */
|
| Line 172... |
Line 172... |
| 172 |
$json = $this->getDao()->consulter($url);
|
172 |
$json = $this->getDao()->consulter($url);
|
| 173 |
$retour = (array) json_decode($json, true);
|
173 |
$retour = (array) json_decode($json, true);
|
| Line 174... |
Line 174... |
| 174 |
|
174 |
|
| Line 175... |
Line -... |
| 175 |
foreach ( $retour[$projet]['champs-supp'] as $key => $chsup ) {
|
- |
|
| 176 |
|
175 |
foreach ( $retour[$projet]['champs-supp'] as $key => $chsup ) {
|
| 177 |
|
176 |
|
| 178 |
$retour[$projet]['champs-supp'][$key]['name'] = $this->clean_string( $chsup['name'] );
|
177 |
$retour[$projet]['champs-supp'][$key]['name'] = $this->clean_string( $chsup['name'] );
|
| Line 179... |
Line 178... |
| 179 |
$retour[$projet]['champs-supp'][$key]['description'] = $this->clean_string( $chsup['description']);
|
178 |
$retour[$projet]['champs-supp'][$key]['description'] = $this->clean_string( $chsup['description']);
|
| Line 210... |
Line 209... |
| 210 |
$clean_string = preg_replace( $patterns, $replacements, $string );
|
209 |
$clean_string = preg_replace( $patterns, $replacements, $string );
|
| Line 211... |
Line 210... |
| 211 |
|
210 |
|
| 212 |
return $clean_string;
|
211 |
return $clean_string;
|
| Line 213... |
Line -... |
| 213 |
}
|
- |
|
| 214 |
|
- |
|
| 215 |
|
212 |
}
|
| 216 |
|
213 |
|
| 217 |
// remplace certains parametres définis en bd par les parametres définis dans l'url
|
214 |
// remplace certains parametres définis en bd par les parametres définis dans l'url
|
| 218 |
private function traiterParametres($estProjetDefini, $tableau) {
|
215 |
private function traiterParametres($estProjetDefini, $tableau) {
|
| 219 |
$criteres = array('tag-obs', 'tag-img', 'projet', 'titre', 'logo');
|
216 |
$criteres = array('tag-obs', 'tag-img', 'projet', 'titre', 'logo');
|
| Line 226... |
Line 223... |
| 226 |
}
|
223 |
}
|
| 227 |
}
|
224 |
}
|
| 228 |
return $tableau;
|
225 |
return $tableau;
|
| 229 |
}
|
226 |
}
|
| Line 230... |
Line -... |
| 230 |
|
- |
|
| 231 |
|
227 |
|
| 232 |
private function rechercherInfosEspeces( $infos_projets ) { //print_r($infos_projets);exit;
|
228 |
private function rechercherInfosEspeces( $infos_projets ) { //print_r($infos_projets);exit;
|
| 233 |
$retour = array();
|
229 |
$retour = array();
|
| 234 |
$referentiel = $infos_projets['referentiel'];
|
230 |
$referentiel = $infos_projets['referentiel'];
|
| 235 |
$urlWsNsTpl = $this->config['chemins']['baseURLServicesEfloreTpl'];
|
231 |
$urlWsNsTpl = $this->config['chemins']['baseURLServicesEfloreTpl'];
|
| Line 269... |
Line 265... |
| 269 |
protected function chargerInfosTaxon( $referentiel, $num_nom ) {
|
265 |
protected function chargerInfosTaxon( $referentiel, $num_nom ) {
|
| 270 |
$url_service_infos = sprintf( $this->config['chemins']['infosTaxonUrl'], $referentiel, $num_nom );
|
266 |
$url_service_infos = sprintf( $this->config['chemins']['infosTaxonUrl'], $referentiel, $num_nom );
|
| 271 |
$infos = json_decode( file_get_contents( $url_service_infos ) );
|
267 |
$infos = json_decode( file_get_contents( $url_service_infos ) );
|
| 272 |
// trop de champs injectés dans les infos espèces peuvent
|
268 |
// trop de champs injectés dans les infos espèces peuvent
|
| 273 |
// faire planter javascript
|
269 |
// faire planter javascript
|
| 274 |
$champs_a_garder = array( 'id', 'nom_sci','nom_sci_complet', 'nom_complet',
|
270 |
$champs_a_garder = array( 'id', 'nom_sci','nom_sci_complet', 'nom_complet', 'famille','nom_retenu.id', 'nom_retenu_complet', 'num_taxonomique' );
|
| 275 |
'famille','nom_retenu.id', 'nom_retenu_complet', 'num_taxonomique' );
|
- |
|
| 276 |
$resultat = array();
|
271 |
$resultat = array();
|
| 277 |
$retour = array();
|
272 |
$retour = array();
|
| 278 |
if ( isset( $infos ) && !empty( $infos ) ) {
|
273 |
if ( isset( $infos ) && !empty( $infos ) ) {
|
| 279 |
$infos = (array) $infos;
|
274 |
$infos = (array) $infos;
|
| 280 |
if ( isset( $infos['nom_sci'] ) && $infos['nom_sci'] !== '' ) {
|
275 |
if ( isset( $infos['nom_sci'] ) && $infos['nom_sci'] !== '' ) {
|