Changeset 2aa2b33 in github
- Timestamp:
- Sep 8, 2010 5:40:39 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 860678e
- Parents:
- ec581c1
- Location:
- program/include
- Files:
-
- 6 edited
-
main.inc (modified) (1 diff)
-
rcmail.php (modified) (2 diffs)
-
rcube_browser.php (modified) (2 diffs)
-
rcube_imap.php (modified) (2 diffs)
-
rcube_imap_generic.php (modified) (2 diffs)
-
rcube_template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
program/include/main.inc
r1fb718ca r2aa2b33 701 701 function strip_quotes($str) 702 702 { 703 return preg_replace('/[\'"]/', '', $str);703 return str_replace(array("'", '"'), '', $str); 704 704 } 705 705 -
program/include/rcmail.php
r564741f r2aa2b33 811 811 return ucfirst($text); 812 812 else if ($attrib['uppercase']) 813 return strtoupper($text);813 return mb_strtoupper($text); 814 814 else if ($attrib['lowercase']) 815 return strtolower($text);815 return mb_strtolower($text); 816 816 817 817 return $text; … … 875 875 if ($dh = @opendir(INSTALL_PATH . 'program/localization')) { 876 876 while (($name = readdir($dh)) !== false) { 877 if ($name {0}=='.' || !is_dir(INSTALL_PATH . 'program/localization/' . $name))877 if ($name[0] == '.' || !is_dir(INSTALL_PATH . 'program/localization/' . $name)) 878 878 continue; 879 879 -
program/include/rcube_browser.php
r372d3bf r2aa2b33 31 31 function __construct() 32 32 { 33 $HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];33 $HTTP_USER_AGENT = strtolower($_SERVER['HTTP_USER_AGENT']); 34 34 35 35 $this->ver = 0; 36 $this->win = str istr($HTTP_USER_AGENT, 'win');37 $this->mac = str istr($HTTP_USER_AGENT, 'mac');38 $this->linux = str istr($HTTP_USER_AGENT, 'linux');39 $this->unix = str istr($HTTP_USER_AGENT, 'unix');36 $this->win = strstr($HTTP_USER_AGENT, 'win'); 37 $this->mac = strstr($HTTP_USER_AGENT, 'mac'); 38 $this->linux = strstr($HTTP_USER_AGENT, 'linux'); 39 $this->unix = strstr($HTTP_USER_AGENT, 'unix'); 40 40 41 $this->opera = str istr($HTTP_USER_AGENT, 'opera');42 $this->ns4 = str istr($HTTP_USER_AGENT, 'mozilla/4') && !stristr($HTTP_USER_AGENT, 'msie');43 $this->ns = ($this->ns4 || str istr($HTTP_USER_AGENT, 'netscape'));44 $this->ie = stristr($HTTP_USER_AGENT, 'compatible; msie') && !$this->opera;45 $this->mz = str istr($HTTP_USER_AGENT, 'mozilla/5');46 $this->chrome = str istr($HTTP_USER_AGENT, 'chrome');47 $this->khtml = str istr($HTTP_USER_AGENT, 'khtml');48 $this->safari = !$this->chrome && ($this->khtml || str istr($HTTP_USER_AGENT, 'safari'));41 $this->opera = strstr($HTTP_USER_AGENT, 'opera'); 42 $this->ns4 = strstr($HTTP_USER_AGENT, 'mozilla/4') && !strstr($HTTP_USER_AGENT, 'msie'); 43 $this->ns = ($this->ns4 || strstr($HTTP_USER_AGENT, 'netscape')); 44 $this->ie = !$this->opera && strstr($HTTP_USER_AGENT, 'compatible; msie'); 45 $this->mz = strstr($HTTP_USER_AGENT, 'mozilla/5'); 46 $this->chrome = strstr($HTTP_USER_AGENT, 'chrome'); 47 $this->khtml = strstr($HTTP_USER_AGENT, 'khtml'); 48 $this->safari = !$this->chrome && ($this->khtml || strstr($HTTP_USER_AGENT, 'safari')); 49 49 50 50 if ($this->ns || $this->chrome) { 51 $test = preg_match('/(mozilla|chrome)\/([0-9.]+)/ i', $HTTP_USER_AGENT, $regs);51 $test = preg_match('/(mozilla|chrome)\/([0-9.]+)/', $HTTP_USER_AGENT, $regs); 52 52 $this->ver = $test ? (float)$regs[2] : 0; 53 53 } … … 57 57 } 58 58 else if ($this->ie || $this->opera) { 59 $test = preg_match('/(msie|opera) ([0-9.]+)/ i', $HTTP_USER_AGENT, $regs);59 $test = preg_match('/(msie|opera) ([0-9.]+)/', $HTTP_USER_AGENT, $regs); 60 60 $this->ver = $test ? (float)$regs[2] : 0; 61 61 } 62 62 63 if (preg_match('/ ([a-z]{2})-([a-z]{2})/ i', $HTTP_USER_AGENT, $regs))63 if (preg_match('/ ([a-z]{2})-([a-z]{2})/', $HTTP_USER_AGENT, $regs)) 64 64 $this->lang = $regs[1]; 65 65 else -
program/include/rcube_imap.php
r272a7e5 r2aa2b33 3427 3427 3428 3428 if (preg_match('/^[\'"]/', $name) && preg_match('/[\'"]$/', $name)) 3429 $name = preg_replace(array('/^[\'"]/', '/[\'"]$/'), '', $name);3429 $name = trim($name, '\'"'); 3430 3430 3431 3431 if ($name && $address && $name != $address) … … 3459 3459 { 3460 3460 $str = rcube_imap::decode_mime_string((string)$input, $this->default_charset); 3461 if ($str {0}=='"' && $remove_quotes)3461 if ($str[0] == '"' && $remove_quotes) 3462 3462 $str = str_replace('"', '', $str); 3463 3463 -
program/include/rcube_imap_generic.php
r272a7e5 r2aa2b33 1259 1259 break; 1260 1260 case 'in-reply-to': 1261 $result[$id]->in_reply_to = preg_replace('/[\n<>]/', '', $string);1261 $result[$id]->in_reply_to = str_replace(array("\n", '<', '>'), '', $string); 1262 1262 break; 1263 1263 case 'references': … … 2116 2116 $min_free = PHP_INT_MAX; 2117 2117 foreach ($quota_lines as $key => $quota_line) { 2118 $quota_line = preg_replace('/[()]/', '', $quota_line);2118 $quota_line = str_replace(array('(', ')'), '', $quota_line); 2119 2119 $parts = explode(' ', $quota_line); 2120 2120 $storage_part = array_search('STORAGE', $parts); -
program/include/rcube_template.php
raf3cf8a0 r2aa2b33 445 445 public function abs_url($str) 446 446 { 447 return preg_replace('/^\//', $this->config['skin_path'].'/', $str); 447 if ($str[0] == '/') 448 return $this->config['skin_path'] . $str; 449 else 450 return $str; 448 451 } 449 452
Note: See TracChangeset
for help on using the changeset viewer.
