Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 2414 → Rev 2415

/trunk/scripts/modules/migration_sauvages/MigrationSauvages.php
1,6 → 1,5
<?php
// Encodage : UTF-8
// +-------------------------------------------------------------------------------------------------------------------+
// declare(encoding='UTF-8');
/**
* Traitement des observations sauvages pour les migrer vers des champs étendus
*
7,26 → 6,27
* Description : classe permettant d'affecter des champs étendus aux observations sauvages. Elle permet aussi
* d'exporter les données à migrer en CSV pour vérifier les informations avant la migration.
* Utilisation :
* - Pour migrer : /opt/lamp/bin/php script.php migration_sauvages -a migrer -v 3
* - Pour exporter : /opt/lamp/bin/php script.php migration_sauvages -a exporter -s chemin_vers_fichier_sortie
* - Pour migrer : <code>/opt/lamp/bin/php cli.php migration_sauvages -a migrer -v 3</code>
* - Pour exporter : <code>/opt/lamp/bin/php cli.php migration_sauvages -a exporter -s chemin_vers_fichier_sortie</code>
*
* @category PHP 5.3
* @package scripts
//Auteur original :
* @author Aurélien PERONNET <aurelien@tela-botanica.org>
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @version $Id$
* @category CEL
* @package Scripts
* @subpackage Migration : Sauvages
* @author Mathias CHOUET <mathias@tela-botanica.org>
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @author Aurelien PERONNET <aurelien@tela-botanica.org>
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
* @copyright 1999-2014 Tela Botanica <accueil@tela-botanica.org>
*/
// +-------------------------------------------------------------------------------------------------------------------+
include_once dirname(__FILE__).'/bibliotheque/Dao.php';
 
class MigrationSauvages extends Script {
protected $parametres_autorises = array(
'-s' => array(false, true, "Chemin vers le fichier de sortie pour l'export"));
 
// +-------------------------------------------------------------------------------------------------------------------+
 
public function executer() {
include_once dirname(__FILE__).'/bibliotheque/Dao.php';
$this->dao = new Dao();
// Récupération de paramétres
// Lancement de l'action demandée
223,5 → 223,4
 
return $champs_etendus;
}
}
?>
}
/trunk/scripts/modules/migration_sauvages/bibliotheque/Dao.php
1,4 → 1,18
<?php
// declare(encoding='UTF-8');
/**
* Contient les requêtes effecturant la migration pour Sauvages.
*
* @category CEL
* @package Scripts
* @subpackage Migration : Sauvages
* @author Mathias CHOUET <mathias@tela-botanica.org>
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @author Aurelien PERONNET <aurelien@tela-botanica.org>
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
* @copyright 1999-2014 Tela Botanica <accueil@tela-botanica.org>
*/
class Dao extends Bdd {
 
public function obtenirNbObservationsSauvages() {
49,5 → 63,4
$ajout = $this->requeter($requete);
return ($ajout !== false);
}
}
?>
}