|
|
@@ -67,18 +67,6 @@ class maj {
|
|
|
backup::create();
|
|
|
file::cleanFilesByOrder(DIR_BACKUP, BACKUP_LIMIT);
|
|
|
|
|
|
-/*
|
|
|
- include_once(DIR_MAJ . "sql/maj.php");
|
|
|
- self::printSeparateur();
|
|
|
- if(goSql() == TRUE){
|
|
|
- self::print("Maj SQL réalisée", self::$colorLineGrey);
|
|
|
- self::printSeparateur();
|
|
|
- $gitReturn = self::bashMaj();
|
|
|
- } else {
|
|
|
- self::print("ERROR : Maj SQL", self::$colorLineRed);
|
|
|
- }
|
|
|
-*/
|
|
|
-
|
|
|
if(self::bashMaj() == FALSE){
|
|
|
self::printSeparateur();
|
|
|
self::print("ERROR : Repo GIT [" . MAJ_TARGET . " - " . git::getCommitHash(MAJ_TARGET) . "]", self::$colorLineRed);
|
|
|
@@ -100,6 +88,28 @@ class maj {
|
|
|
self::print("Mise à jour du repo GIT [" . MAJ_TARGET . " - " . git::getCommitHash(MAJ_TARGET) . "] effectué", self::$colorLineGrey);
|
|
|
}
|
|
|
|
|
|
+ include_once(DIR_MAJ . "sql/maj.php");
|
|
|
+ if(goSql() == FALSE){
|
|
|
+ self::printSeparateur();
|
|
|
+ self::print("ERROR : Maj SQL", self::$colorLineRed);
|
|
|
+ self::printSeparateur();
|
|
|
+ self::print(">> ROLLBACK : Restauration des données", self::$colorLineOrange);
|
|
|
+ backup::restore(DIR_BACKUP . backup::last());
|
|
|
+
|
|
|
+ alert::recError("ERROR : Maj SQL");
|
|
|
+
|
|
|
+ historique::recRef("/parametres.html");
|
|
|
+ historique::add(array(
|
|
|
+ "idType" => historique::getIdRef("ERROR"),
|
|
|
+ "idUser" => session::getId(),
|
|
|
+ "idPage" => historique::getIdRef("/parametres.html"),
|
|
|
+ "log" => "ERROR : Maj SQL"
|
|
|
+ ));
|
|
|
+ } else {
|
|
|
+ self::printSeparateur();
|
|
|
+ self::print("Maj SQL réalisée", self::$colorLineGrey);
|
|
|
+ }
|
|
|
+
|
|
|
self::printSeparateur();
|
|
|
self::print(">> Réinitialisation des JSON", self::$colorLineGrey);
|
|
|
json::create("salaries");
|