diff options
author | Matthijs Kuiper <info@matthijskuiper.nl> | 2018-01-14 21:17:30 +0100 |
---|---|---|
committer | Matthijs Kuiper <info@matthijskuiper.nl> | 2018-09-01 11:51:41 +0200 |
commit | 3457a490dc8c9d92d23c540964a4e2d965c1c464 (patch) | |
tree | fe777114964cc607021762ec4a3502a12c919c37 /html/import/import_renderer-dm.php | |
parent | 7e5c50603cbe1307d68a2b5b8ee14409e15a9dcb (diff) |
Fix passing too few function arguments errors
Diffstat (limited to 'html/import/import_renderer-dm.php')
-rw-r--r-- | html/import/import_renderer-dm.php | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/html/import/import_renderer-dm.php b/html/import/import_renderer-dm.php index a889865..a8a33af 100644 --- a/html/import/import_renderer-dm.php +++ b/html/import/import_renderer-dm.php @@ -1,31 +1,27 @@ +<?php +include_once('includes/renderer-dm.php'); -<?php - include_once('includes/renderer-dm.php'); +// Only run script if at least 5 minutes were played +if (($time_gameend-$time_gamestart) > 300 && count(array_unique($playernames)) >= 2) { + try { + $safe_uid = mysqli_real_escape_string($GLOBALS["___mysqli_link"], $uid); - - // Only run script if at least 5 minutes were played - if(($time_gameend-$time_gamestart)>300 && count(array_unique($playernames))>=2) { + // Get relevant data + list($datafrags, $derivfrags, $topFraggers, $counter, $datafragsteam, $derivfragsteam, $topTeams) = parseDMdata($safe_uid); - try { - $safe_uid = mysqli_real_escape_string($GLOBALS["___mysqli_link"], $uid); - - // Get relevant data - list($datafrags, $derivfrags, $topFraggers,$counter,$datafragsteam,$derivfragsteam,$topTeams) = parseDMdata($safe_uid); - - if($playernumberofteams > 1 && count(array_unique($playernames)) > 3 &&($gamename == "Tournament Team Game" || $gamename == "Tournament Team Game (insta)" || $gamename == "2v2v2v2 iTDM")) - renderFragBarsTeams($datafragsteam,$derivfragsteam,$topTeams,$counter); - - renderFragBars($datafrags, $derivfrags, $topFraggers,$counter); - - if(count($playernames) == 2) - renderDataPickups($safe_uid,false,($playerteams[$topFraggers[0]]==0),$topFraggers); - else if($playernumberofteams == 2) - renderDataPickups($safe_uid); - - } catch (Exception $e) { - - // Do nothing, but simply do not block import + if ($playernumberofteams > 1 && count(array_unique($playernames)) > 3 && ($gamename == "Tournament Team Game" || $gamename == "Tournament Team Game (insta)" || $gamename == "2v2v2v2 iTDM")) + renderFragBarsTeams($datafragsteam,$derivfragsteam,$topTeams,$counter); - } + renderFragBars($datafrags, $derivfrags, $topFraggers,$counter); + + if(count($playernames) == 2) + renderDataPickups($safe_uid,false,($playerteams[$topFraggers[0]]==0),$topFraggers); + else if($playernumberofteams == 2) + renderDataPickups($safe_uid); + + } catch (Exception $e) { + // Do nothing, but simply do not block import } -?>
\ No newline at end of file +} + +?> |