Changeset 19823
- Timestamp:
- 2011/01/04 22:10:23 (12 years ago)
- bzr:base-revision:
- svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:19822
- bzr:committer:
- Kentaro Ohkouchi <ohkouchi@loop-az.jp>
- bzr:file-ids:
data/class/SC_Display.php 18986@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-E%2Fdata%2Fclass%2FSC_Display.php- bzr:mapping-version:
- v4
- bzr:merge:
ohkouchi@loop-az.jp-20110104130612-y5ey6gojq1xmiqo0- bzr:repository-uuid:
- 1e3b908f-19a9-db11-a64c-001125224ba8
- bzr:revision-id:
- ohkouchi@loop-az.jp-20110104131017-gzt42owwlks4rfiw
- bzr:revno:
- 2552
- bzr:revprop:branch-nick:
- branches/version-2_5-dev
- bzr:root:
- branches/version-2_5-dev
- bzr:text-revisions:
data/class/SC_Display.php ohkouchi@loop-az.jp-20110104130612-y5ey6gojq1xmiqo0- bzr:timestamp:
- 2011-01-04 22:10:17.061000109 +0900
- bzr:user-agent:
- bzr2.2.1+bzr-svn1.0.4
- svn:original-date:
- 2011-01-04T13:10:17.061000Z
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/SC_Display.php
r19814 r19823 34 34 var $device; 35 35 36 var $autoSet;37 38 36 /** SC_View インスタンス */ 39 37 var $view; … … 49 47 */ 50 48 51 function SC_Display($hasPrevURL = true , $autoGenerateHttpHeaders = true) {49 function SC_Display($hasPrevURL = true) { 52 50 $this->response = new SC_Response_Ex(); 53 $this->autoSet = $autoGenerateHttpHeaders;54 51 if ($hasPrevURL) { 55 52 $this->setPrevURL(); … … 139 136 /** 140 137 * 機種を判別する。 138 * 141 139 * SC_Display::MOBILE = ガラケー = 1 142 140 * SC_Display::SMARTPHONE = スマホ = 2 143 141 * SC_Display::PC = PC = 10 144 * ※PHP4の為にconstは使っていません。 1がガラケーで、2がスマホで4がPCです。 145 * @return 142 * 143 * @static 144 * @return integer 端末種別ID 146 145 */ 147 146 function detectDevice(){ … … 149 148 $su = new SC_SmartphoneUserAgent(); 150 149 $retDevice = 0; 151 if ($nu->isMobile()){152 $retDevice =DEVICE_TYPE_MOBILE;153 } elseif ($su->isSmartphone()){154 $retDevice =DEVICE_TYPE_SMARTPHONE;155 } else{156 $retDevice =DEVICE_TYPE_PC;150 if ($nu->isMobile()) { 151 return DEVICE_TYPE_MOBILE; 152 } elseif ($su->isSmartphone()) { 153 return DEVICE_TYPE_SMARTPHONE; 154 } else { 155 return DEVICE_TYPE_PC; 157 156 } 158 159 if($this->autoSet){160 $this->setDevice($retDevice);161 }162 return $retDevice;163 157 } 164 158
Note: See TracChangeset
for help on using the changeset viewer.