40,19 → 40,6 |
$this->initialiserProjet('baseflor'); |
$cmd = $this->getParametre('a'); |
switch ($cmd) { |
case 'chargerTous' : |
$this->supprimerTous(); |
$this->chargerStructureSql(); |
$this->chargerOntologies(); |
$this->verifFichier(); |
if ($this->nb_erreurs == 0){ |
$this->chargerDonnees(); |
$this->genererChamps(); |
} else { |
echo "je ne peux pas charger les données car le fichier comporte des erreurs. |
Voir le fichier baseflor_verif.txt\n"; |
} |
break; |
case 'chargerStructureSql' : |
$this->chargerStructureSql(); |
break; |
238,6 → 225,7 |
protected function chargerStructureSql() { |
$contenuSql = $this->recupererContenu(Config::get('chemins.structureSql')); |
$this->executerScripSql($contenuSql); |
|
} |
|
|
261,7 → 249,7 |
} |
|
private function supprimerTous() { |
$requete = "DROP TABLE IF EXISTS baseflor_meta, baseflor_v2012_03_19"; |
$requete = "DROP TABLE IF EXISTS baseflor_meta, baseflor_ontologies, baseflor_v2012_03_19"; |
$this->getBdd()->requeter($requete); |
} |
|