BUGFIX disable third party browscap by default (#2336)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2.2@52387 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-04-09 06:07:40 +00:00 committed by Sam Minnee
parent 38b489ce26
commit 13670979ac
2 changed files with 13 additions and 9 deletions

View File

@ -44,8 +44,10 @@ class PageView extends DataObject {
protected $hitdata = null;
function init() {
$browscap = new Browscap();
$this->hitdata = $browscap->getBrowser(null, true);
if(Statistics::$browscap_enabled) {
$browscap = new Browscap();
$this->hitdata = $browscap->getBrowser(null, true);
}
}
/**

View File

@ -1,19 +1,21 @@
<?php
/**
* @package cms
*/
/**
* Statistics class for gathering and formatting of statistical data for tables and charts in
* both public and administrative contexts.
*
* @package cms
*/
class Statistics extends Controller {
function __construct() {
}
/**
* Enable logging of browser information
* based on the third-party Browscap library.
* Turned off by default.
*
* @var boolean
*/
public static $browscap_enabled = false;
static function trend_chart($table, $filter = "day", $name, $type, $color) {
$trendstrl = _t('Statistics.TRENDS', 'Trends');