From 3b6ea3d5f381e4f7a1a996b3d474c6816170175e Mon Sep 17 00:00:00 2001 From: machine62 <28401480+machine62@users.noreply.github.com> Date: Sat, 14 Mar 2020 09:35:59 +0100 Subject: [PATCH] Finalisation Ajout id player et id_alliance insertion universe installation si version sup a 3.3.7 suppriesion d'une fonction inutile (create univers vide) --- cron.php | 2 +- include/function.php | 6 +++--- index.php | 2 +- model/config.php | 8 ++++++++ model/install.php | 2 +- model/model_CST_UNIVERSE.php | 2 +- update.php | 3 +++ version.txt | 4 ++-- vue/index.php | 2 ++ 9 files changed, 22 insertions(+), 9 deletions(-) diff --git a/cron.php b/cron.php index 0a10fc8..07018b8 100644 --- a/cron.php +++ b/cron.php @@ -11,7 +11,7 @@ define('IN_SUPERAPIX', true); define('IN_XTENSE', true); -date_default_timezone_set(@date_default_timezone_get()); +date_default_timezone_set(date_default_timezone_get()); if (preg_match('#mod#', getcwd())) chdir('../../'); diff --git a/include/function.php b/include/function.php index b7a0aae..c8d995d 100644 --- a/include/function.php +++ b/include/function.php @@ -277,7 +277,7 @@ function traitement_universe($value) { $query = array(); - $fields = "g, s, r, id_player , datadate , name_planete ,name_moon , moon , sender_id "; + $fields = "g, s, r, id_player , datadate , name_planete ,name_moon , moon , sender_id "; foreach ($value->planet as $ta_planete_en_cours) { $t_coordonnee = explode(':', $ta_planete_en_cours[0]['coords']); // récuperation coord en cours @@ -313,7 +313,7 @@ function traitement_universe($value) { $sql .= " ON "; $sql .= "( A.id_alliance = P.id_ally ) "; $sql .= " SET "; - $sql .= " U.moon = T.moon , U.name = T.name_planete , U.ally = A.tag , U.player = P.name_player , U.status = P.status , U.last_update = T.datadate , U.last_update_user_id = T.sender_id "; + $sql .= " U.player_id = T.id_player , U.ally_id = P.id_ally , U.moon = T.moon , U.name = T.name_planete , U.ally = A.tag , U.player = P.name_player , U.status = P.status , U.last_update = T.datadate , U.last_update_user_id = T.sender_id "; $sql .= " WHERE "; $sql .= " U.last_update <= T.datadate "; // <= pour permettre d ecraser la derniere importation si plantage de la derniere @@ -655,7 +655,7 @@ function findSpaId() { // le chemin distant renvoit il a un xml ????? function DistantIsFileIXml($url) { if ($stream = fopen($url, 'r')) { - // 5 premier octet => verif bidons todo voir charge avec get_headers ... + // 5 premier octet => verif bidons $sStream = stream_get_contents($stream, 5); if ($sStream == " 0 ) + // faire une requete update apour remise a 0 avec comme where la galaxie et le timstamp ( si inf => 0 ) //$uni = (int)$galaxie; // for ($i = 1; $i < ((int)$server_config['num_of_systems'] + 1 ); $i++) { diff --git a/update.php b/update.php index c9ec17a..8775d01 100644 --- a/update.php +++ b/update.php @@ -41,6 +41,9 @@ create_table_players(); delete_table_alliances(); create_table_alliances() ; +delete_table_univers(); +create_table_univers(); +rempli_table_univers(); diff --git a/version.txt b/version.txt index 2a05c6c..ce923da 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,5 @@ Superapix -0.3.2 +0.3.3 superapix,superapix,superapix,superapix,index.php,1,1 -3.3.2 +3.3.7 diff --git a/vue/index.php b/vue/index.php index af5c5bc..7859562 100644 --- a/vue/index.php +++ b/vue/index.php @@ -227,12 +227,14 @@