Subversion Repositories eFlore/Applications.del

Rev

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

Rev 1840 Rev 1845
Line 55... Line 55...
55
		$this->sql->ajouterContraintes();
55
		$this->sql->ajouterContraintes();
56
		$this->sql->ajouterConstrainteAppliImg();
56
		$this->sql->ajouterConstrainteAppliImg();
57
		$this->sql->definirOrdreSqlAppliImg();
57
		$this->sql->definirOrdreSqlAppliImg();
Line 58... Line 58...
58
 
58
 
59
		$idImgs = $this->getIdImages();
59
		$idImgs = $this->getIdImages();
Line 60... Line 60...
60
		$this->navigation->setTotal($this->getTotal());
60
		$this->navigation->setTotal($this->sql->getTotalLignesTrouvees());
61
 
61
 
62
		// Ce n'est pas la peine de continuer s'il n'y a pas eu de résultats
62
		// Ce n'est pas la peine de continuer s'il n'y a pas eu de résultats
63
		$resultat = new ResultatService();
63
		$resultat = new ResultatService();
Line 98... Line 98...
98
			}
98
			}
99
		}
99
		}
100
		return $idImgs;
100
		return $idImgs;
101
	}
101
	}
Line 102... Line -...
102
 
-
 
103
	private function getTotal() {
-
 
104
		$resultat = $this->bdd->recuperer('SELECT FOUND_ROWS() AS nbre');
-
 
105
		return intval($resultat['nbre']);
-
 
106
	}
-
 
107
 
102
 
108
	private function getInfosImages($idImgs) {
103
	private function getInfosImages($idImgs) {
109
		$obsChamps = $this->sql->getAliasDesChamps($this->mappings['observations']);
104
		$obsChamps = $this->sql->getAliasDesChamps($this->mappings['observations']);
110
		$imgChamps = $this->sql->getAliasDesChamps($this->mappings['images']);
105
		$imgChamps = $this->sql->getAliasDesChamps($this->mappings['images']);
Line 134... Line 129...
134
			$image = array(
129
			$image = array(
135
				'id_image' => $infos['id_image'],
130
				'id_image' => $infos['id_image'],
136
				'binaire.href' => sprintf($urlImgTpl, $infos['id_image'], $imageFormat),
131
				'binaire.href' => sprintf($urlImgTpl, $infos['id_image'], $imageFormat),
137
				'mots_cles_texte' => @$infos['mots_cles_texte_img'], // @, peut avoir été filtré par array_map() ci-dessus
132
				'mots_cles_texte' => @$infos['mots_cles_texte_img'], // @, peut avoir été filtré par array_map() ci-dessus
138
			);
133
			);
139
			
134
 
140
			unset($infos['id_image'], $infos['mots_cles_texte_img'], $infos['jsonindex']);
135
			unset($infos['id_image'], $infos['mots_cles_texte_img'], $infos['jsonindex']);
141
			if (!isset($obs_merged[$id])) {
136
			if (!isset($obs_merged[$id])) {
142
				$obs_merged[$id] = $image;
137
				$obs_merged[$id] = $image;
143
			}
138
			}
144
			$obs_merged[$id]['observation'] = $infos;
139
			$obs_merged[$id]['observation'] = $infos;