Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 968 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 968 Rev 997
Line 43... Line 43...
43
		$this->chargerRepartition();
43
		$this->chargerRepartition();
44
		$this->extraireInfosNomsPourTplDetermination();
44
		$this->extraireInfosNomsPourTplDetermination();
45
		$this->infosPourTpl['urlWidget'] = Config::get('base_url_widget')."?referentiel=".Registre::get('parametres.referentiel');
45
		$this->infosPourTpl['urlWidget'] = Config::get('base_url_widget')."?referentiel=".Registre::get('parametres.referentiel');
46
	}
46
	}
Line 47... Line -...
47
	
-
 
48
	
47
	
49
	private function obtenirUrlsDessins() {
48
	private function obtenirUrlsDessins() {
50
		if (Config::get(Registre::get('parametres.referentiel').'.baseDessins') != "") {
49
		if (Config::get(Registre::get('parametres.referentiel').'.baseDessins') != "") {
51
			$this->extraireInfosTaxons();
50
			$this->extraireInfosTaxons();
52
			$this->imagesService->setProjet(Config::get(Registre::get('parametres.referentiel').'.baseDessins'));
51
			$this->imagesService->setProjet(Config::get(Registre::get('parametres.referentiel').'.baseDessins'));
Line 60... Line 59...
60
					$this->infosPourTpl['dessins'] = $images;
59
					$this->infosPourTpl['dessins'] = $images;
61
				}
60
				}
62
			}
61
			}
63
		}
62
		}
64
	}
63
	}
-
 
64
	
65
	private function extraireInfosTaxons() {
65
	private function extraireInfosTaxons() {
66
		foreach ($this->noms as $id => $nom ) {
66
		foreach ($this->noms as $id => $nom ) {
67
			if (array_key_exists('num_taxonomique', $nom)) {
67
			if (array_key_exists('num_taxonomique', $nom)) {
68
				$this->infosPourTpl['taxons'][$id] = $nom['num_taxonomique'];
68
				$this->infosPourTpl['taxons'][$id] = $nom['num_taxonomique'];
69
			}
69
			}
Line 74... Line 74...
74
		$this->imagesService->setProjet('cel');
74
		$this->imagesService->setProjet('cel');
75
		$ids = $this->extraireIdDesNoms();
75
		$ids = $this->extraireIdDesNoms();
76
		$urls = $this->imagesService->getUrlsImagesParIdsNoms($ids);
76
		$urls = $this->imagesService->getUrlsImagesParIdsNoms($ids);
77
		$this->infosPourTpl['imagesUrls'] = $this->supprimerCodeReferentielDesIds($urls);
77
		$this->infosPourTpl['imagesUrls'] = $this->supprimerCodeReferentielDesIds($urls);
78
	}
78
	}
-
 
79
	
79
	private function extraireIdDesNoms() {
80
	private function extraireIdDesNoms() {
80
		$ids = array();
81
		$ids = array();
81
		foreach ($this->noms as $id => $nom) {
82
		foreach ($this->noms as $id => $nom) {
82
			$idAAjouter = $id;
83
			$idAAjouter = $id;
83
			if (is_numeric($idAAjouter)) {
84
			if (is_numeric($idAAjouter)) {
Line 101... Line 102...
101
			$urlsNettoyees[$id] = $url;
102
			$urlsNettoyees[$id] = $url;
102
		}
103
		}
103
		return $urlsNettoyees;
104
		return $urlsNettoyees;
104
	}
105
	}
105
	private function supprimerCodeReferentiel($chaine) {
106
	private function supprimerCodeReferentiel($chaine) {
106
		$codeReferentiel = $this->parametres->referentielCourant.'.';
107
		$codeReferentiel = Registre::get('parametres.referentiel').'.';
107
		$chaine = str_replace($codeReferentiel, '', $chaine);
108
		$chaine = str_replace($codeReferentiel, '', $chaine);
108
		return $chaine;
109
		return $chaine;
109
	}
110
	}
Line 110... Line 111...
110
	
111