Subversion Repositories eFlore/Applications.moissonnage

Rev

Rev 34 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34 Rev 43
Line 43... Line 43...
43
					}
43
					}
44
					$stationsRetour[] = $station;
44
					$stationsRetour[] = $station;
45
				}
45
				}
Line 46... Line 46...
46
				
46
				
47
				foreach ($stationBdd as $cle => $valeur) {
47
				foreach ($stationBdd as $cle => $valeur) {
48
					if ($cle != 'taxon') {
48
					if ($cle != 'taxon' && $cle != 'auteur') {
49
						$station[$cle] = $valeur;
49
						$station[$cle] = $valeur;
50
					}
50
					}
51
				}
51
				}
-
 
52
				$station['taxons'] = array(trim($stationBdd['taxon']));
52
				$station['taxons'] = array(trim($stationBdd['taxon']));
53
				$station['auteurs'] = array(trim($stationBdd['auteur']));
53
				$this->mettreAJourBbox($station);
54
				$this->mettreAJourBbox($station);
54
			} else {
55
			} else {
-
 
56
				$station['taxons'][] = trim($stationBdd['taxon']);
55
				$station['taxons'][] = trim($stationBdd['taxon']);
57
				$station['auteurs'][] = trim($stationBdd['auteur']);
56
			}
58
			}
57
		}
59
		}
58
		return $stationsRetour;
60
		return $stationsRetour;
Line 91... Line 93...
91
			}
93
			}
92
		}
94
		}
93
		unset($station['station']);
95
		unset($station['station']);
94
		unset($station['zone_geo']);
96
		unset($station['zone_geo']);
95
		unset($station['ce_zone_geo']);
97
		unset($station['ce_zone_geo']);
96
		$station['taxons'] = str_replace("&", "&", implode(',', $station['taxons']));
98
		$station['taxons'] = str_replace("&", "&", implode(', ', $station['taxons']));
-
 
99
		$station['auteurs'] = str_replace("&", "&", implode(', ', array_unique($station['auteurs'])));
97
	}
100
	}
Line 98... Line 101...
98
	
101
	
99
	private function mettreEnPageStationMoissonnage(& $station) {
102
	private function mettreEnPageStationMoissonnage(& $station) {
100
		$station['nom_station'] = str_replace("&", "&", trim($station['nom']));
103
		$station['nom_station'] = str_replace("&", "&", trim($station['nom']));
Line 104... Line 107...
104
			if (intval($station['departement']) > 95) {
107
			if (intval($station['departement']) > 95) {
105
				$station['departement'] = substr($station['code_insee'],0, 2);
108
				$station['departement'] = substr($station['code_insee'],0, 2);
106
			}
109
			}
107
		}
110
		}
108
		unset($station['nom']);
111
		unset($station['nom']);
109
		$station['taxons'] = str_replace("&", "&", implode(',', $station['taxons']));
112
		$station['taxons'] = str_replace("&", "&", implode(', ', $station['taxons']));
-
 
113
		$station['auteurs'] = str_replace("&", "&", implode(', ', array_unique($station['auteurs'])));
110
	}
114
	}
Line 111... Line 115...
111
	
115
	
112
	public function formaterException(Exception $erreur) {
116
	public function formaterException(Exception $erreur) {
113
		$nomFichierWfs = dirname(__FILE__).DS."squelettes".DS."Exception.tpl.xml";
117
		$nomFichierWfs = dirname(__FILE__).DS."squelettes".DS."Exception.tpl.xml";