summaryrefslogtreecommitdiff
path: root/it_browser.class
diff options
context:
space:
mode:
authorChristian Schneider2009-04-22 12:49:48 +0000
committerChristian Schneider2009-04-22 12:49:48 +0000
commit3ef0c43348c8f735bab740e4a9b7bf8df26fbb00 (patch)
tree93c63c624528a013f0efcad223ac3b49cdf0f13f /it_browser.class
parent414cc575912785ef15e4a26eb002bef1d0f739bf (diff)
downloaditools-3ef0c43348c8f735bab740e4a9b7bf8df26fbb00.tar.gz
itools-3ef0c43348c8f735bab740e4a9b7bf8df26fbb00.tar.bz2
itools-3ef0c43348c8f735bab740e4a9b7bf8df26fbb00.zip
Get rid of ereg/split, replaced by preg equivalents
Diffstat (limited to 'it_browser.class')
-rw-r--r--it_browser.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/it_browser.class b/it_browser.class
index f46df92..d2d2673 100644
--- a/it_browser.class
+++ b/it_browser.class
@@ -62,7 +62,7 @@ function it_browser()
/* $this->UserAgent = "Mozilla/4.0 [de] (compatible; MSIE 5.0; Windows 95; .NET CRL 2.0.154)"; */
/* Find "Mozilla/4.0" */
- if (ereg("([^/]*)/([^ ]*)", $this->UserAgent, $regs))
+ if (preg_match("#([^/]*)/([^ ]*)#", $this->UserAgent, $regs))
{
$this->Type = $regs[1];
$this->Version = (double)$regs[2];
@@ -74,7 +74,7 @@ function it_browser()
$optattr = preg_split("/;\s+/", $regs[1]);
if ($optattr[0] == "compatible")
{
- if (ereg("([^/]*)[/ ]([^/]*)", $optattr[1], $regs))
+ if (preg_match("#([^/]*)[/ ]([^/]*)#", $optattr[1], $regs))
{
$this->Type = $regs[1];
$this->Version = (double)$regs[2];
@@ -99,7 +99,7 @@ function it_browser()
}
/* Find optional "[de]" */
- if (!$this->Language && ereg("\[(.*)\]", $this->UserAgent, $regs))
+ if (!$this->Language && preg_match("/\[(.*)\]/", $this->UserAgent, $regs))
$this->Language = $regs[1];
/* Check for Safari/KHTML */