summaryrefslogtreecommitdiff
path: root/program/include/rcube_browser.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-05-04 08:31:55 +0000
committeralecpl <alec@alec.pl>2009-05-04 08:31:55 +0000
commit23a2eec4d540b5f971ed6377e7ad776456ee0633 (patch)
tree34081a5830cb6c2c843dbf3b873bf2643400c134 /program/include/rcube_browser.php
parentdb5abc6c211d78ad80b716ddef11eabe5e32f137 (diff)
- ereg -> preg
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';