17,6 → 17,8 |
require_once('Bdd2.php'); |
|
abstract class Cel { |
const ARRET_SERVICE = false; |
|
const TYPE_OBS = 'observation'; |
const TYPE_IMG = 'image'; |
|
236,7 → 238,7 |
|
//+----------------------------------------------------------------------------------------------------------------+ |
// GESTION DE L'IDENTIFICATION |
|
|
static function getAuthIdentifiant() { |
return isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : null; |
} |
277,7 → 279,7 |
} |
} |
} |
|
|
public function controleAppelIpAutorisee() { |
$ips_autorisees = explode(',', @$this->config['jrest_admin']['ip_autorisees']); |
if(!in_array($_SERVER['REMOTE_ADDR'], $ips_autorisees) && $_SERVER['REMOTE_ADDR'] != $_SERVER['SERVER_ADDR']) { |
583,15 → 585,15 |
} |
return ($this->etreNull($valeurs)) ? null : $valeurs; |
} |
|
|
protected function obtenirSousTaxonsPourNt($referentiel, $nt) { |
return $this->obtenirSousTaxons($referentiel, 'nt:'.$nt); |
} |
|
|
protected function obtenirSousTaxonsPourNn($referentiel, $nn) { |
return $this->obtenirSousTaxons($referentiel, $nn); |
} |
|
|
private function obtenirSousTaxons($referentiel, $requete) { |
$sous_taxons = array(); |
$url_service_taxon = str_replace('{referentiel}', $referentiel, $this->config['eflore']['url_service_taxon']); |
602,13 → 604,13 |
} |
return $sous_taxons; |
} |
|
|
protected function supprimerVersionDuReferentiel($referentiel) { |
$referentiel_parties = explode(':', $referentiel); |
$referentiel_parties = explode('_', $referentiel_parties[0]); |
return $referentiel_parties[0]; |
} |
|
|
protected function getUrlEflore($referentiel, $nn) { |
$urlEflore = null; |
if (! $this->etreNull($nn)) { |