Added PHP and MySQL versions and OS to the statistics

SVN:trunk[2482]
This commit is contained in:
Denis Flaven
2012-11-30 10:08:26 +00:00
parent a975974fc0
commit b563a64eb6
2 changed files with 11 additions and 1 deletions

View File

@@ -825,6 +825,14 @@ EOF
return $aResult;
}
static public function GetMySQLVersion($sDBServer, $sDBUser, $sDBPwd)
{
$oDBSource = new CMDBSource;
$oDBSource->Init($sDBServer, $sDBUser, $sDBPwd);
$sDBVersion = $oDBSource->GetDBVersion();
return $sDBVersion;
}
static public function AsyncCheckDB($oPage, $aParameters)
{
$sDBServer = $aParameters['db_server'];

View File

@@ -2079,7 +2079,9 @@ class WizStepDone extends WizardStep
$sForm .= '<input type="hidden" name="auth_pwd" value="'.htmlentities($this->oWizard->GetParameter('admin_pwd'), ENT_QUOTES, 'UTF-8').'">';
$sForm .= "<p style=\"text-align:center;width:100%\"><button id=\"enter_itop\" type=\"submit\">Enter ".ITOP_APPLICATION."</button></p>";
$sForm .= '</form>';
$oPage->add('<img style="border:0" src="http://www.combodo.com/stats/?p='.urlencode(ITOP_APPLICATION).'&v='.urlencode(ITOP_VERSION).'"/>');
$sPHPVersion = phpversion();
$sMySQLVersion = SetupUtils::GetMySQLVersion($this->oWizard->GetParameter('db_server'), $this->oWizard->GetParameter('db_user'), $this->oWizard->GetParameter('db_pwd'));
$oPage->add('<img style="border:0" src="http://www.combodo.com/stats/?p='.urlencode(ITOP_APPLICATION).'&v='.urlencode(ITOP_VERSION).'&php='.urlencode($sPHPVersion).'&mysql='.urlencode($sMySQLVersion).'&os='.urlencode(PHP_OS).'"/>');
$sForm = addslashes($sForm);
$oPage->add_ready_script("$('#wiz_form').after('$sForm');");
}