/**
* Returns the name of the browser with the given user agent.
*
* @param string $userAgent
* @return string
*/
public static function getBrowser($userAgent = '')
{
require_once CMS_DIR . 'lib/util/Browser.php';
$browser = new \Browser($userAgent);
if (!$browser->isRobot()) {
return $browser->getBrowser();
}
return 'unknown';
}