Subversion Repositories eFlore/Applications.cel

Rev

Rev 2458 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2458 Rev 2461
1
<?php
1
<?php
2
// declare(encoding='UTF-8');
2
// declare(encoding='UTF-8');
3
/**
3
/**
4
 * Service importation releve en cours :
4
 * Service importation releve en cours :
5
 * 1 : L'utilisateur à traiter est communique au service
5
 * 1 : L'utilisateur à traiter est communique au service
6
 * 2 : Les releves associés à la session en cours sont transferés à l'utilisateur identifié
6
 * 2 : Les releves associés à la session en cours sont transferés à l'utilisateur identifié
7
 *
7
 *
8
 * @internal   Mininum PHP version : 5.2
8
 * @internal   Mininum PHP version : 5.2
9
 * @category   CEL
9
 * @category   CEL
10
 * @package    Services
10
 * @package    Services
11
 * @subpackage Observations
11
 * @subpackage Observations
12
 * @version    0.1
12
 * @version    0.1
13
 * @author     Mathias CHOUET <mathias@tela-botanica.org>
13
 * @author     Mathias CHOUET <mathias@tela-botanica.org>
14
 * @author     Jean-Pascal MILCENT <jpm@tela-botanica.org>
14
 * @author     Jean-Pascal MILCENT <jpm@tela-botanica.org>
15
 * @author     Aurelien PERONNET <aurelien@tela-botanica.org>
15
 * @author     Aurelien PERONNET <aurelien@tela-botanica.org>
16
 * @license    GPL v3 <http://www.gnu.org/licenses/gpl.txt>
16
 * @license    GPL v3 <http://www.gnu.org/licenses/gpl.txt>
17
 * @license    CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
17
 * @license    CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
18
 * @copyright  1999-2014 Tela Botanica <accueil@tela-botanica.org>
18
 * @copyright  1999-2014 Tela Botanica <accueil@tela-botanica.org>
19
 */
19
 */
20
class InventoryImport extends Cel  {
20
class InventoryImport extends Cel {
21
 
21
 
22
	public function getElement($uid){
22
	public function getElement($uid){
23
		// Controle detournement utilisateur
23
		// Controle detournement utilisateur
24
	 	$this->controleUtilisateur($uid[0]);
24
	 	$this->controleUtilisateur($uid[0]);
25
 
-
 
26
	 	$id_session_temporaire = session_id();
-
 
27
 
25
 
28
	 	$gestionnaire_observation = new GestionObservation($this->config);
26
	 	$gestionnaireObs = new GestionObservation($this->config);
29
	 	$migration_compte_a_compte = $gestionnaire_observation->migrerObservations($id_session_temporaire, $uid[0]);
-
 
30
 
-
 
31
		$retour = false;
-
 
32
		if($migration_compte_a_compte) {
-
 
33
			$retour = 'OK';
-
 
-
 
27
	 	$migration_compte_a_compte = $gestionnaireObs->migrerObservations(session_id(), $uid[0]);
34
		}
28
 
35
 
29
		$retour = ($migration_compte_a_compte) ? 'OK' : false;
36
		echo $retour;
30
		echo $retour;
37
		exit();
31
		exit();
38
	}
32
	}
39
}
33
}