FIX env of browser not loaded in website
This commit is contained in:
parent
4a9960797b
commit
a73eccf70d
@ -27,6 +27,18 @@
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';
|
||||||
|
|
||||||
|
// Detection browser (copy of code from main.inc.php)
|
||||||
|
if (isset($_SERVER["HTTP_USER_AGENT"]) && is_object($conf) && empty($conf->browser->name))
|
||||||
|
{
|
||||||
|
$tmp = getBrowserInfo($_SERVER["HTTP_USER_AGENT"]);
|
||||||
|
$conf->browser->name = $tmp['browsername'];
|
||||||
|
$conf->browser->os = $tmp['browseros'];
|
||||||
|
$conf->browser->version = $tmp['browserversion'];
|
||||||
|
$conf->browser->layout = $tmp['layout']; // 'classic', 'phone', 'tablet'
|
||||||
|
//var_dump($conf->browser);
|
||||||
|
|
||||||
|
if ($conf->browser->layout == 'phone') $conf->dol_no_mouse_hover = 1;
|
||||||
|
}
|
||||||
// Define $website
|
// Define $website
|
||||||
if (!is_object($website))
|
if (!is_object($website))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user