Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 140 Rev 142
Line 174... Line 174...
174
		return $ok;
174
		return $ok;
175
	}
175
	}
Line 176... Line 176...
176
 
176
 
177
	private function analyserMasqueNn() {
177
	private function analyserMasqueNn() {
178
		$nn = $this->parametres['masque.nn'];
178
		$nn = $this->parametres['masque.nn'];
179
		if (is_int($nn)) {
179
		if (preg_match('/^[0-9]+$/', $nn)) {
180
			$this->ref_tax_demande[self::CODE_REFTAX_DEFAUT] = $nn;
180
			$this->ref_tax_demande[self::CODE_REFTAX_DEFAUT][] = $nn;
181
		} else {
181
		} else {
182
			// ceci contient potentiellement des formes ref_tax1:nn1,nn2;ref_tax2:nn3,nn4
182
			// ceci contient potentiellement des formes ref_tax1:nn1,nn2;ref_tax2:nn3,nn4
183
			$projetsListeEtNumNoms = explode(';', $nn);
183
			$projetsListeEtNumNoms = explode(';', $nn);
184
			if (count($projetsListeEtNumNoms) > 0) {
184
			if (count($projetsListeEtNumNoms) > 0) {
Line 191... Line 191...
191
		}
191
		}
192
	}
192
	}
Line 193... Line 193...
193
 
193
 
194
	private function obtenirIdImageAuHasard() {
194
	private function obtenirIdImageAuHasard() {
195
		$refTax = self::CODE_REFTAX_DEFAUT;
195
		$refTax = self::CODE_REFTAX_DEFAUT;
Line 196... Line 196...
196
		$numNom = $this->Bdd->proteger($this->ref_tax_demande[$refTax]);
196
		$numNom = $this->Bdd->proteger($this->ref_tax_demande[$refTax][0]);
197
 
197
 
198
		//TODO: modifier la requete lors du passage à la nouvelle base de données pour faire quelque chose
198
		//TODO: modifier la requete lors du passage à la nouvelle base de données pour faire quelque chose
199
		// du numéro nomenclatural + modifier les champs appelés pour le nouveau format
199
		// du numéro nomenclatural + modifier les champs appelés pour le nouveau format
Line 356... Line 356...
356
 
356
 
357
	private function construireResultats() {
357
	private function construireResultats() {
358
		$resultats = array();
358
		$resultats = array();
359
		$this->extraireIntitulesAuteurs();
359
		$this->extraireIntitulesAuteurs();
360
		foreach ($this->infosImages as $img) {
-
 
361
			$id = $img['id_img'];
-
 
362
 
360
		foreach ($this->infosImages as $img) {
363
			$info = array();
361
			$info = array();
364
			$info['date'] = $img['date'];
362
			$info['date'] = $img['date'];
365
			$info['mime'] = self::MIME_JPEG;
363
			$info['mime'] = self::MIME_JPEG;
366
			$info['auteur'] = $this->formaterAuteur($img);
364
			$info['auteur'] = $this->formaterAuteur($img);
367
			$info['binaire.href'] = $this->formaterUrlImage($id);
365
			$info['binaire.href'] = $this->formaterUrlImage($img);
368
			$info['determination'] = $this->formaterDetermination($img);
366
			$info['determination'] = $this->formaterDetermination($img);
369
			$info['determination.nom_sci'] = $img['nom_sel'];
367
			$info['determination.nom_sci'] = $img['nom_sel'];
370
			$info['determination.nom_sci.code'] = $this->formaterNomSciCode($img);
368
			$info['determination.nom_sci.code'] = $this->formaterNomSciCode($img);
Line -... Line 369...
-
 
369
			$info['station'] = $this->formaterStation($img);
371
			$info['station'] = $this->formaterStation($img);
370
 
372
 
371
			$id = $img['id_img'];
373
			if (!isset($resultats[$id])) {
372
			if (!isset($resultats[$id])) {
374
				$resultats[$id] = $info;
373
				$resultats[$id] = $info;
375
			} else {
374
			} else {