Line 208... |
Line 208... |
208 |
$infos = Cel::db()->query($requete)->fetchAll(PDO::FETCH_ASSOC);
|
208 |
$infos = Cel::db()->query($requete)->fetchAll(PDO::FETCH_ASSOC);
|
209 |
if ($infos === false) {
|
209 |
if ($infos === false) {
|
210 |
$this->messages[] = "La requête suivante a retourné aucun résultat :\n$requete";
|
210 |
$this->messages[] = "La requête suivante a retourné aucun résultat :\n$requete";
|
211 |
}
|
211 |
}
|
212 |
} catch (PDOException $e) {
|
212 |
} catch (PDOException $e) {
|
- |
|
213 |
$msgTpl = 'Requête echec. Fichier : "%s". Ligne : "%s". Message : %s';
|
213 |
$this->messages[] = sprintf(Cel::db()->getTxt('sql_erreur'), $e->getFile(), $e->getLine(), $e->getMessage());
|
214 |
$this->messages[] = sprintf($msgTpl, $e->getFile(), $e->getLine(), $e->getMessage());
|
214 |
}
|
215 |
}
|
215 |
return $infos;
|
216 |
return $infos;
|
216 |
}
|
217 |
}
|
Line 217... |
Line 218... |
217 |
|
218 |
|
Line 236... |
Line 237... |
236 |
private function construireDonneesCommunesAuFlux($infos) {
|
237 |
private function construireDonneesCommunesAuFlux($infos) {
|
237 |
$donnees = $this->getFlux($this->service);
|
238 |
$donnees = $this->getFlux($this->service);
|
238 |
$donnees['guid'] = $this->getUrlServiceBase();
|
239 |
$donnees['guid'] = $this->getUrlServiceBase();
|
239 |
$donnees['lien_service'] = $this->creerUrlService();
|
240 |
$donnees['lien_service'] = $this->creerUrlService();
|
240 |
$donnees['lien_cel'] = (isset($infos['nom_sel_nn']) && $infos['nom_sel_nn'] != '' && $infos['nom_sel_nn'] != 0) ?
|
241 |
$donnees['lien_cel'] = (isset($infos['nom_sel_nn']) && $infos['nom_sel_nn'] != '' && $infos['nom_sel_nn'] != 0) ?
|
241 |
$this->getUrlEflore($infos['nom_referentiel'], $infos['nom_sel_nn']) : '';
|
242 |
$this->getUrlEflore($infos['nom_referentiel'], $infos['nom_sel_nn']) : '';
|
242 |
$donnees['editeur'] = $this->config['settings']['editeur'];
|
243 |
$donnees['editeur'] = $this->config['settings']['editeur'];
|
243 |
$derniere_info_en_date = reset($infos);
|
244 |
$derniere_info_en_date = reset($infos);
|
244 |
$date_modification_timestamp = strtotime($derniere_info_en_date['date_creation']);
|
245 |
$date_modification_timestamp = strtotime($derniere_info_en_date['date_creation']);
|
245 |
$donnees['date_maj_RSS'] = date(DATE_RSS, $date_modification_timestamp);
|
246 |
$donnees['date_maj_RSS'] = date(DATE_RSS, $date_modification_timestamp);
|
246 |
$donnees['date_maj_ATOM'] = date(DATE_ATOM, $date_modification_timestamp);
|
247 |
$donnees['date_maj_ATOM'] = date(DATE_ATOM, $date_modification_timestamp);
|
Line 294... |
Line 295... |
294 |
if ($this->etreNull($element['id_observation'])) {
|
295 |
if ($this->etreNull($element['id_observation'])) {
|
295 |
// Lien vers image grand format
|
296 |
// Lien vers image grand format
|
296 |
$lien = $this->getUrlImage($element['id_image'], $this->format_image);
|
297 |
$lien = $this->getUrlImage($element['id_image'], $this->format_image);
|
297 |
} else {
|
298 |
} else {
|
298 |
// Lien vers fiche eFlore onglet Illustration
|
299 |
// Lien vers fiche eFlore onglet Illustration
|
299 |
$lien = $this->getUrlEflore($element['nom_referentiel'], $element['nom_sel_nn'], 'illustration');
|
300 |
$lien = $this->getUrlEflore($element['nom_referentiel'], $element['nom_sel_nn'], 'illustration');
|
300 |
}
|
301 |
}
|
301 |
return $lien;
|
302 |
return $lien;
|
302 |
}
|
303 |
}
|
Line 303... |
Line 304... |
303 |
|
304 |
|
Line 397... |
Line 398... |
397 |
|
398 |
|
398 |
private function getServiceMultiCriteres() {
|
399 |
private function getServiceMultiCriteres() {
|
399 |
$contenu = '';
|
400 |
$contenu = '';
|
400 |
if (isset($_GET['debut'])) $this->start = $_GET['debut'];
|
401 |
if (isset($_GET['debut'])) $this->start = $_GET['debut'];
|
401 |
if (isset($_GET['limite'])) $this->limit = $_GET['limite'];
|
402 |
if (isset($_GET['limite'])) $this->limit = $_GET['limite'];
|
402 |
|
403 |
|
Line 403... |
Line 404... |
403 |
$this->limit = ($this->limit < 1000) ? $this->limit : 1000;// Pour éviter les abus !
|
404 |
$this->limit = ($this->limit < 1000) ? $this->limit : 1000;// Pour éviter les abus !
|
404 |
|
405 |
|
405 |
if ($this->parametresSontDemandes()) {
|
406 |
if ($this->parametresSontDemandes()) {
|
Line 702... |
Line 703... |
702 |
$donnees['items'][0]['titre'] = '';
|
703 |
$donnees['items'][0]['titre'] = '';
|
703 |
$contenu = Cel::traiterSquelettePhp($this->squelette, $donnees);
|
704 |
$contenu = Cel::traiterSquelettePhp($this->squelette, $donnees);
|
704 |
return $contenu;
|
705 |
return $contenu;
|
705 |
}
|
706 |
}
|
Line 706... |
Line 707... |
706 |
|
707 |
|
707 |
private function getIntituleAuteur($courriel) {
|
708 |
private function getIntituleAuteur($courriel) {
|
708 |
$courriel = strtolower($courriel);
|
709 |
$courriel = strtolower($courriel);
|
709 |
$intitule = $this->auteurs[$courriel];
|
710 |
$intitule = $this->auteurs[$courriel];
|
710 |
return $intitule;
|
711 |
return $intitule;
|
711 |
}
|
712 |
}
|
712 |
}
|
713 |
}
|