Skip to content
Snippets Groups Projects
Commit fda57d7a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Update mirrorbits section

parent a2917d7b
No related branches found
Tags 3.0.2
No related merge requests found
......@@ -446,40 +446,41 @@
{
echo "<tr><td class=\"category\" style=\"text-align: left;\"><strong>$key</strong></td>\n";
// <Mirrorbits>
if (array_key_exists($key, $table_mirrorbits))
{
$platforms = array("Windows", "Macintosh", "Source");
foreach($platforms as $platform)
{
if (array_key_exists($platform, $table_mirrorbits[$key]))
{
$value = 0;
if (is_array($table_mirrorbits[$key][$platform]))
{
foreach($table_mirrorbits[$key][$platform] as $url)
{
$final = str_replace("#version#", $key, $url);
$value += mirrorbits_fetch($final);
}
}
else
{
$final = str_replace("#version#", $key, $table_mirrorbits[$key][$platform]);
$value += mirrorbits_fetch($final);
}
if ($platform == "Windows" || $platform == "Macintosh")
{
$t[$platform] += $value;
}
// Historically "source" is computed from the total - windows - mac
$t["Total"] += $value;
}
}
}
// </Mirrorbits>
// <Mirrorbits>
if (array_key_exists($key, $table_mirrorbits))
{
$ftp_multiplier = 1.021; // Estimation of downloads on our ftp/http directly, based on the stats of the last months (early 2019)
$platforms = array("Windows", "Macintosh", "Source");
foreach($platforms as $platform)
{
if (array_key_exists($platform, $table_mirrorbits[$key]))
{
$value = 0;
if (is_array($table_mirrorbits[$key][$platform]))
{
foreach($table_mirrorbits[$key][$platform] as $url)
{
$final = str_replace("#version#", $key, $url);
$value += mirrorbits_fetch($final) * $ftp_multiplier;
}
}
else
{
$final = str_replace("#version#", $key, $table_mirrorbits[$key][$platform]);
$value += mirrorbits_fetch($final) * $ftp_multiplier;
}
if ($platform == "Windows" || $platform == "Macintosh")
{
$t[$platform] += $value;
}
// Historically "source" is computed from the total - windows - mac
$t["Total"] += $value;
}
}
}
// </Mirrorbits>
$wintotal += $t["Windows"];
$mactotal += $t["Macintosh"];
......@@ -492,7 +493,7 @@
echo "</tr>\n";
}
// Android Installs by users (downloads are higher)
// Android Installs by users (actual downloads are higher)
$android_old = 77956940;
$android_new = 163917190;
echo "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment