Subversion Repositories eFlore/Applications.cel

Rev

Rev 2458 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
416 aurelien 1
<?php
2458 jpm 2
// declare(encoding='UTF-8');
416 aurelien 3
/**
2458 jpm 4
 * Service importation releve en cours :
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é
7
 *
8
 * @internal   Mininum PHP version : 5.2
9
 * @category   CEL
10
 * @package    Services
11
 * @subpackage Observations
12
 * @version    0.1
13
 * @author     Mathias CHOUET <mathias@tela-botanica.org>
14
 * @author     Jean-Pascal MILCENT <jpm@tela-botanica.org>
15
 * @author     Aurelien PERONNET <aurelien@tela-botanica.org>
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>
18
 * @copyright  1999-2014 Tela Botanica <accueil@tela-botanica.org>
19
 */
2461 jpm 20
class InventoryImport extends Cel {
416 aurelien 21
 
2458 jpm 22
	public function getElement($uid){
23
		// Controle detournement utilisateur
928 aurelien 24
	 	$this->controleUtilisateur($uid[0]);
2458 jpm 25
 
2461 jpm 26
	 	$gestionnaireObs = new GestionObservation($this->config);
27
	 	$migration_compte_a_compte = $gestionnaireObs->migrerObservations(session_id(), $uid[0]);
2458 jpm 28
 
2461 jpm 29
		$retour = ($migration_compte_a_compte) ? 'OK' : false;
928 aurelien 30
		echo $retour;
2458 jpm 31
		exit();
416 aurelien 32
	}
2458 jpm 33
}