Skip to content

Commit

Permalink
Merge branch 'staging' into fix-schema-updates-3.9.8-2019-06-15
Browse files Browse the repository at this point in the history
  • Loading branch information
richard67 authored Jun 23, 2019
2 parents 5372fe8 + 27ea0dc commit 3eb5986
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion plugins/system/stats/stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,22 @@ protected function getRenderer($layoutId = 'default')
*/
private function getStatsData()
{
return array(
$data = array(
'unique_id' => $this->getUniqueId(),
'php_version' => PHP_VERSION,
'db_type' => $this->db->name,
'db_version' => $this->db->getVersion(),
'cms_version' => JVERSION,
'server_os' => php_uname('s') . ' ' . php_uname('r')
);

// Check if we have a MariaDB version string and extract the proper version from it
if (preg_match('/^(?:5\.5\.5-)?(mariadb-)?(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)/i', $data['db_version'], $versionParts))
{
$data['db_version'] = $versionParts['major'] . '.' . $versionParts['minor'] . '.' . $versionParts['patch'];
}

return $data;
}

/**
Expand Down

0 comments on commit 3eb5986

Please sign in to comment.