summaryrefslogtreecommitdiff
path: root/program/include/rcube_browser.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcube_browser.php')
-rw-r--r--program/include/rcube_browser.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/program/include/rcube_browser.php b/program/include/rcube_browser.php
index 56e6d3ce2..4010dbc48 100644
--- a/program/include/rcube_browser.php
+++ b/program/include/rcube_browser.php
@@ -47,23 +47,23 @@ class rcube_browser
$this->safari = ($this->khtml || stristr($HTTP_USER_AGENT, 'safari'));
if ($this->ns) {
- $test = eregi("mozilla\/([0-9\.]+)", $HTTP_USER_AGENT, $regs);
+ $test = preg_match('/mozilla\/([0-9.]+)/i', $HTTP_USER_AGENT, $regs);
$this->ver = $test ? (float)$regs[1] : 0;
}
if ($this->mz) {
- $test = ereg("rv:([0-9\.]+)", $HTTP_USER_AGENT, $regs);
+ $test = preg_match('/rv:([0-9.]+)/', $HTTP_USER_AGENT, $regs);
$this->ver = $test ? (float)$regs[1] : 0;
}
if($this->ie) {
- $test = eregi("msie ([0-9\.]+)", $HTTP_USER_AGENT, $regs);
+ $test = preg_match('/msie ([0-9.]+)/i', $HTTP_USER_AGENT, $regs);
$this->ver = $test ? (float)$regs[1] : 0;
}
if ($this->opera) {
- $test = eregi("opera ([0-9\.]+)", $HTTP_USER_AGENT, $regs);
+ $test = preg_match('/opera ([0-9.]+)/i', $HTTP_USER_AGENT, $regs);
$this->ver = $test ? (float)$regs[1] : 0;
}
- if (eregi(" ([a-z]{2})-([a-z]{2})", $HTTP_USER_AGENT, $regs))
+ if (preg_match('/ ([a-z]{2})-([a-z]{2})/i', $HTTP_USER_AGENT, $regs))
$this->lang = $regs[1];
else
$this->lang = 'en';