Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 3538 Rev 3539
Line 19... Line 19...
19
 * @copyright  1999-2014 Tela Botanica <accueil@tela-botanica.org>
19
 * @copyright  1999-2014 Tela Botanica <accueil@tela-botanica.org>
20
 */
20
 */
21
class CelWidgetSaisie extends Cel {
21
class CelWidgetSaisie extends Cel {
Line 22... Line 22...
22
 
22
 
-
 
23
	private $projet = null;
23
	private $projet = null;
24
	private $projetId = null;
24
	private $projetTags = array();
25
	private $projetTags = array();
25
	private $tagsObs = null;
26
	private $tagsObs = null;
26
	private $tagsImg = null;
27
	private $tagsImg = null;
27
	private $userId = null;
28
	private $userId = null;
Line 39... Line 40...
39
		if (self::ARRET_SERVICE) {
40
		if (self::ARRET_SERVICE) {
40
			$this->messages[] = "Désactivation temporaire du service d'envoi des données au CEL.";
41
			$this->messages[] = "Désactivation temporaire du service d'envoi des données au CEL.";
41
		} else if (array_key_exists('projet', $requeteDonnees)) {
42
		} else if (array_key_exists('projet', $requeteDonnees)) {
42
			$this->debug[] = 'Projet : '.$requeteDonnees['projet'];
43
			$this->debug[] = 'Projet : '.$requeteDonnees['projet'];
43
			$this->projet = $requeteDonnees['projet'];
44
			$this->projet = $requeteDonnees['projet'];
-
 
45
			$this->projetId = $requeteDonnees['id_projet'];
Line 44... Line 46...
44
 
46
 
45
			// Si c'est une obs Pl@ntNet
47
			// Si c'est une obs Pl@ntNet
46
			if (! empty($requeteDonnees['tag-obs']) && strpos(strtolower($requeteDonnees['tag-obs']), 'plantnet') !== false) {
48
			if (! empty($requeteDonnees['tag-obs']) && strpos(strtolower($requeteDonnees['tag-obs']), 'plantnet') !== false) {
47
				$this->isFromPlantNet = true;
49
				$this->isFromPlantNet = true;
Line 141... Line 143...
141
									$obsAAjouter['certainty'] = $obs['certitude'];
143
									$obsAAjouter['certainty'] = $obs['certitude'];
142
									break;
144
									break;
143
							}
145
							}
144
						}
146
						}
145
						$obsAAjouter['input_source'] = 'widget';
147
						$obsAAjouter['input_source'] = 'widget';
146
						if (isset($obs['projet_id'])) {
-
 
147
						    $obsAAjouter['project_id'] = $obs['projet_id'];
148
						$obsAAjouter['project_id'] = $this->projet_id;
148
						    $obsAAjouter['project'] = $obs['projet'];
149
						$obsAAjouter['project'] = $this->projet;
149
						}
-
 
150
						if ($this->isFromPlantNet) {
150
						if ($this->isFromPlantNet) {
151
							$obsAAjouter['input_source'] = 'PlantNet';
151
							$obsAAjouter['input_source'] = 'PlantNet';
152
							$obsAAjouter['plantnet_id'] = $obs['obs_id'];
152
							$obsAAjouter['plantnet_id'] = $obs['obs_id'];
153
						}
153
						}