mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix detection of text browser with w3m
This commit is contained in:
parent
f0a6e11e36
commit
21eb8e585f
|
|
@ -603,8 +603,12 @@ function getBrowserInfo($user_agent)
|
|||
$version = end($reg);
|
||||
} elseif (preg_match('/l[iy]n(x|ks)(\(|\/|\s)*([\d\.]+)/i', $user_agent, $reg)) {
|
||||
// MS products at end
|
||||
$name = 'lynxlinks';
|
||||
$name = 'textbrowser';
|
||||
$version = empty($reg[3]) ? '' : $reg[3];
|
||||
} elseif (preg_match('/w3m\/([\d\.]+)/i', $user_agent, $reg)) {
|
||||
// MS products at end
|
||||
$name = 'textbrowser';
|
||||
$version = empty($reg[1]) ? '' : $reg[1];
|
||||
}
|
||||
|
||||
if ($tablet) {
|
||||
|
|
|
|||
|
|
@ -510,7 +510,7 @@ if (GETPOST('theme', 'aZ09')) {
|
|||
}
|
||||
|
||||
// Set global MAIN_OPTIMIZEFORTEXTBROWSER (must be before login part)
|
||||
if (GETPOSTINT('textbrowser') || (!empty($conf->browser->name) && $conf->browser->name == 'lynxlinks')) { // If we must enable text browser
|
||||
if (GETPOSTINT('textbrowser') || (!empty($conf->browser->name) && $conf->browser->name == 'textbrowser')) { // If we must enable text browser
|
||||
$conf->global->MAIN_OPTIMIZEFORTEXTBROWSER = 2;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user