Changeset 19029 for branches/camp/camp-2_5-E/data/class
- Timestamp:
- 2010/11/06 21:19:13 (16 years ago)
- Location:
- branches/camp/camp-2_5-E/data/class
- Files:
-
- 1 added
- 1 edited
-
SC_Display.php (modified) (2 diffs)
-
SC_SmartphoneUserAgent.php (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/camp/camp-2_5-E/data/class/SC_Display.php
r19027 r19029 65 65 if($nu->isMobile()){ 66 66 $retDevice = 1; 67 }elseif ($ this->isSmartphone()){67 }elseif ($nu->isSmartphone()){ 68 68 $retDevice = 2; 69 69 }else{ … … 77 77 } 78 78 79 function isSmartphone(){80 $useragents = array(81 'iPhone', // Apple iPhone82 'iPod', // Apple iPod touch83 'Android', // 1.5+ Android84 'dream', // Pre 1.5 Android85 'CUPCAKE', // 1.5+ Android86 'blackberry9500', // Storm87 'blackberry9530', // Storm88 'blackberry9520', // Storm v289 'blackberry9550', // Storm v290 'blackberry9800', // Torch91 'webOS', // Palm Pre Experimental92 'incognito', // Other iPhone browser93 'webmate' // Other iPhone browser94 );95 96 $pattern = implode("|", $useragents);97 return preg_match('/['.$pattern.']/', $_SERVER['HTTP_USER_AGENT']);98 99 }100 101 102 79 function assign(LC_Page $page){ 103 80
Note: See TracChangeset
for help on using the changeset viewer.
