Subversion Repositories eFlore/Applications.cel

Rev

Rev 1198 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1198 Rev 1200
Line 134... Line 134...
134
		$this->getMotsCles();
134
		$this->getMotsCles();
Line 135... Line 135...
135
 
135
 
136
		echo "-------------------------------------------------------------------\n\n";
136
		echo "-------------------------------------------------------------------\n\n";
137
		echo "  ETAPE 2. Migration des utilisateurs ... \n\n";
137
		echo "  ETAPE 2. Migration des utilisateurs ... \n\n";
138
		echo "-------------------------------------------------------------------\n\n";
138
		echo "-------------------------------------------------------------------\n\n";
-
 
139
		$this->migrerUtilisateurs();
Line 139... Line 140...
139
		$this->migrerUtilisateurs();
140
 
140
 
141
 
141
		echo "-------------------------------------------------------------------\n\n";
142
		echo "-------------------------------------------------------------------\n\n";
142
		echo "  ETAPE 3. Migration des zone géographiques ... \n\n";
143
		echo "  ETAPE 3. Migration des zone géographiques ... \n\n";
Line 143... Line 144...
143
		echo "-------------------------------------------------------------------\n\n";
144
		echo "-------------------------------------------------------------------\n\n";
144
		$this->migrerZonesGeo();
145
		$this->migrerZonesGeo();
145
 
146
 
146
		echo "-------------------------------------------------------------------\n\n";
147
		echo "-------------------------------------------------------------------\n\n";
-
 
148
		echo "  ETAPE 4. Migration des observations ... \n\n";
147
		echo "  ETAPE 4. Migration des observations ... \n\n";
149
		echo "-------------------------------------------------------------------\n\n";
148
		echo "-------------------------------------------------------------------\n\n";
150
		$this->migrerObs();
149
		$this->migrerObs();
151
		$this->mettreANullPrenomNomVide();
Line 150... Line 152...
150
		$this->ordonnerObs();
152
		$this->ordonnerObs();
151
		echo "\n"."\n"."\n";
153
		echo "\n"."\n"."\n";
Line 629... Line 631...
629
	}
631
	}
Line 630... Line 632...
630
 
632
 
631
	public function mailValide($mail) {
633
	public function mailValide($mail) {
632
		// vérification bidon mais ça suffit pour ici
634
		// vérification bidon mais ça suffit pour ici
-
 
635
		return !(strpos('@', $mail) === false);
-
 
636
	}
-
 
637
 
-
 
638
	private function mettreANullPrenomNomVide() {
-
 
639
		$bdd = self::$bdd_cel_migration;
-
 
640
		$requete = 	"UPDATE $bdd.cel_obs ".
-
 
641
				'SET prenom_utilisateur = NULL '.
-
 
642
				"WHERE prenom_utilisateur = '' ";
-
 
643
		$this->executer($requete);
-
 
644
 
-
 
645
		$requete = 	"UPDATE $bdd.cel_obs ".
-
 
646
				'SET nom_utilisateur = NULL '.
-
 
647
				"WHERE nom_utilisateur = '' ";
633
		return !(strpos('@', $mail) === false);
648
		$this->executer($requete);
634
	}
649
	}
635
}
650
}