Skip to content

Commit

Permalink
Merge pull request #865 from EC-CUBE/dependabot/composer/mobiledetect…
Browse files Browse the repository at this point in the history
…/mobiledetectlib-3.74.3

Bump mobiledetect/mobiledetectlib from 2.8.45 to 3.74.3
  • Loading branch information
dotani1111 authored Apr 11, 2024
2 parents 07dbe95 + ea37623 commit a0d0e72
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"php": "^5.4 || ^7.0 || ^8.0",
"ext-gd": "*",
"ext-mbstring": "*",
"mobiledetect/mobiledetectlib": "^2.8",
"mobiledetect/mobiledetectlib": "^3.74",
"nanasess/mdb2": "^2.5",
"nanasess/php8-compat": "^1.0",
"pear/archive_tar": "^1.4.3",
Expand Down
26 changes: 14 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion data/class/SC_SmartphoneUserAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

use Detection\MobileDetect;

/**
* スマートフォンの情報を扱うクラス.
*
Expand All @@ -36,7 +38,7 @@ class SC_SmartphoneUserAgent
*/
public static function isSmartphone()
{
$detect = new Mobile_Detect;
$detect = new MobileDetect();
// SPでかつPC表示OFFの場合
// TabletはPC扱い
return ($detect->isMobile() && !$detect->isTablet()) && !SC_SmartphoneUserAgent_Ex::getSmartphonePcFlag();
Expand Down

0 comments on commit a0d0e72

Please sign in to comment.