Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 869 Rev 1242
Line 34... Line 34...
34
					$this->chargerBdtfx();
34
					$this->chargerBdtfx();
35
					$this->genererChpNomSciHtml();
35
					$this->genererChpNomSciHtml();
36
					$this->genererChpFamille();
36
					$this->genererChpFamille();
37
					$this->genererDonneesTestMultiVersion();
37
					$this->genererDonneesTestMultiVersion();
38
					$this->genererChpHierarchie();
38
					$this->genererChpHierarchie();
-
 
39
					$this->genererBDTFXReduit();
39
					break;
40
					break;
40
				case 'chargerStructureSql' :
41
				case 'chargerStructureSql' :
41
					$this->chargerStructureSql();
42
					$this->chargerStructureSql();
42
					break;
43
					break;
43
				case 'chargerBdtfx' :
44
				case 'chargerBdtfx' :
Line 53... Line 54...
53
					$this->genererChpHierarchie();
54
					$this->genererChpHierarchie();
54
					break;
55
					break;
55
				case 'genererDonneesTestMultiVersion' :
56
				case 'genererDonneesTestMultiVersion' :
56
					$this->genererDonneesTestMultiVersion();
57
					$this->genererDonneesTestMultiVersion();
57
					break;
58
					break;
-
 
59
				case 'genererBDTFXR' :
-
 
60
					$this->genererBDTFXReduit();
-
 
61
					break;
58
				case 'supprimerDonneesTestMultiVersion' :
62
				case 'supprimerDonneesTestMultiVersion' :
59
					$this->supprimerDonneesTestMultiVersion();
63
					$this->supprimerDonneesTestMultiVersion();
60
					break;
64
					break;
61
				case 'supprimerTous' :
65
				case 'supprimerTous' :
62
					$this->supprimerTous();
66
					$this->supprimerTous();
Line 324... Line 328...
324
 
328
 
325
		$tableTest = Config::get('tables.bdtfxTest');
329
		$tableTest = Config::get('tables.bdtfxTest');
326
		$requete = "DROP TABLE IF EXISTS $tableTest";
330
		$requete = "DROP TABLE IF EXISTS $tableTest";
327
		$this->getBdd()->requeter($requete);
331
		$this->getBdd()->requeter($requete);
-
 
332
	}
-
 
333
	
-
 
334
	private function genererBDTFXReduit() {
-
 
335
		$table = Config::get('tables.bdtfx');
-
 
336
		$version = Config::get('version');
-
 
337
	
-
 
338
		$requete = "create table bdtfxr_v".$version." as (SELECT *
-
 
339
						FROM ".$table."
-
 
340
						WHERE 
-
 
341
							(`presence` = 'P' AND num_nom = num_nom_retenu)
-
 
342
						OR 
-
 
343
							(`flore_bonnier_num` != '' OR `flore_cnrs_num` != '' OR `flore_coste_num` != ''
-
 
344
								OR `flore_fournier_num` != '' OR `flore_fg_num` != ''))"; 
-
 
345
		$table = $this->getBdd()->requeter($requete);
-
 
346
		
-
 
347
		$requete_meta = "INSERT INTO `bdtfxr_meta`(`guid`, `langue_meta`, `code`, `version`, `titre`, `description`, `mots_cles`, `citation`, `url_tech`, `url_projet`, `source`, `createurs`, `editeur`, `contributeurs`, `droits`, `url_droits`, `langue`, `date_creation`, `date_validite`, `couverture_spatiale`, `couverture_temporelle`, `web_services`) ".
-
 
348
				" SELECT * FROM `bdtfx_meta` WHERE `version` = '".str_replace('_', '.', $version)."'";
-
 
349
		$meta = $this->getBdd()->requeter($requete_meta);
Line 328... Line 350...
328
	}
350
	}
329
 
351
 
330
	private function supprimerTous() {
352
	private function supprimerTous() {
331
		$requete = "DROP TABLE IF EXISTS bdtfx_meta, bdtfx_v1_01, bdtfx_v1_02";
353
		$requete = "DROP TABLE IF EXISTS bdtfx_meta, bdtfx_v1_01, bdtfx_v1_02";