mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
38b489ce26
commit
13670979ac
@ -44,8 +44,10 @@ class PageView extends DataObject {
|
|||||||
protected $hitdata = null;
|
protected $hitdata = null;
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
$browscap = new Browscap();
|
if(Statistics::$browscap_enabled) {
|
||||||
$this->hitdata = $browscap->getBrowser(null, true);
|
$browscap = new Browscap();
|
||||||
|
$this->hitdata = $browscap->getBrowser(null, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
|
||||||
* @package cms
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Statistics class for gathering and formatting of statistical data for tables and charts in
|
* Statistics class for gathering and formatting of statistical data for tables and charts in
|
||||||
* both public and administrative contexts.
|
* both public and administrative contexts.
|
||||||
|
*
|
||||||
* @package cms
|
* @package cms
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Statistics extends Controller {
|
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) {
|
static function trend_chart($table, $filter = "day", $name, $type, $color) {
|
||||||
$trendstrl = _t('Statistics.TRENDS', 'Trends');
|
$trendstrl = _t('Statistics.TRENDS', 'Trends');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user