Ignore:
Timestamp:
May 4, 2009 4:31:55 AM (4 years ago)
Author:
alec
Message:
  • ereg -> preg
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_browser.php

    r2237 r2453  
    4848 
    4949        if ($this->ns) { 
    50             $test = eregi("mozilla\/([0-9\.]+)", $HTTP_USER_AGENT, $regs); 
     50            $test = preg_match('/mozilla\/([0-9.]+)/i', $HTTP_USER_AGENT, $regs); 
    5151            $this->ver = $test ? (float)$regs[1] : 0; 
    5252        } 
    5353        if ($this->mz) { 
    54             $test = ereg("rv:([0-9\.]+)", $HTTP_USER_AGENT, $regs); 
     54            $test = preg_match('/rv:([0-9.]+)/', $HTTP_USER_AGENT, $regs); 
    5555            $this->ver = $test ? (float)$regs[1] : 0; 
    5656        } 
    5757        if($this->ie) { 
    58             $test = eregi("msie ([0-9\.]+)", $HTTP_USER_AGENT, $regs); 
     58            $test = preg_match('/msie ([0-9.]+)/i', $HTTP_USER_AGENT, $regs); 
    5959            $this->ver = $test ? (float)$regs[1] : 0; 
    6060        } 
    6161        if ($this->opera) { 
    62             $test = eregi("opera ([0-9\.]+)", $HTTP_USER_AGENT, $regs); 
     62            $test = preg_match('/opera ([0-9.]+)/i', $HTTP_USER_AGENT, $regs); 
    6363            $this->ver = $test ? (float)$regs[1] : 0; 
    6464        } 
    6565 
    66         if (eregi(" ([a-z]{2})-([a-z]{2})", $HTTP_USER_AGENT, $regs)) 
     66        if (preg_match('/ ([a-z]{2})-([a-z]{2})/i', $HTTP_USER_AGENT, $regs)) 
    6767            $this->lang =  $regs[1]; 
    6868        else 
Note: See TracChangeset for help on using the changeset viewer.