Skip to content

Commit

Permalink
Correctif Callback Xtense
Browse files Browse the repository at this point in the history
  • Loading branch information
darknoon29 committed Feb 12, 2020
1 parent f96507c commit 6bb537b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions _xtense.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function attack_rc($rapport)
return FALSE;

//On regarde dans les coordonnées de l'espace personnel du joueur qui insère les données via le plugin si il fait partie des attaquants et/ou des défenseurs
$query = "SELECT coordinates FROM " . TABLE_USER_BUILDING . " WHERE user_id='" . $user_data['user_id'] . "'";
$query = "SELECT `coordinates` FROM " . TABLE_USER_BUILDING . " WHERE `user_id` ='" . $user_data['user_id'] . "'";
$result = $db->sql_query($query);
$coordinates = array();
while ($coordinate = $db->sql_fetch_row($result))
Expand Down Expand Up @@ -130,7 +130,7 @@ function attack_rc($rapport)
}

//On vérifie que cette attaque n'a pas déja été enregistrée
$query = "SELECT attack_id FROM " . TABLE_ATTAQUES_ATTAQUES . " WHERE attack_user_id='" . $user_data['user_id'] . "' AND attack_date='$timestamp' AND attack_coord='$coord_attaque' ";
$query = "SELECT `attack_id` FROM " . TABLE_ATTAQUES_ATTAQUES . " WHERE `attack_user_id` ='" . $user_data['user_id'] . "' AND `attack_date`='$timestamp' AND `attack_coord`='$coord_attaque' ";
$result = $db->sql_query($query);
$nb = $db->sql_numrows($result);

Expand Down Expand Up @@ -162,7 +162,7 @@ function attack_rr($rapport)
$timestamp = $rapport['time'];
$coordonne = $rapport['coords'][0] . ":" . $rapport['coords'][1] . ":" . $rapport['coords'][2];
//On vérifie que ce recyclage n'a pas déja été enregistrée
$query = "SELECT recy_id FROM " . TABLE_ATTAQUES_RECYCLAGES . " WHERE recy_user_id='" . $user_data['user_id'] . "' AND recy_date='$timestamp' AND recy_coord='$coordonne' ";
$query = "SELECT `recy_id` FROM " . TABLE_ATTAQUES_RECYCLAGES . " WHERE `recy_user_id` ='" . $user_data['user_id'] . "' AND `recy_date` ='$timestamp' AND `recy_coord` ='$coordonne' ";
$result = $db->sql_query($query);
$nb = $db->sql_numrows($result);
// Si on ne trouve rien
Expand All @@ -182,8 +182,8 @@ function read_config ()
global $attack_config;

//récupération des paramètres de config
var $configs = mod_get_option('config');
foreach($configs as $config) $attack_config = unserialize($config);
$configs = mod_get_option('config');
foreach($configs as $config) $attack_config = json_decode($config);
}

/*
Expand Down

0 comments on commit 6bb537b

Please sign in to comment.