diff --git a/composer.json b/composer.json index 4ae78d48ea..716df6cb09 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/composer.lock b/composer.lock index f36f0c768d..a1c6b82a93 100644 --- a/composer.lock +++ b/composer.lock @@ -8,31 +8,33 @@ "packages": [ { "name": "mobiledetect/mobiledetectlib", - "version": "2.8.45", + "version": "3.74.3", "source": { "type": "git", "url": "https://github.com/serbanghita/Mobile-Detect.git", - "reference": "96aaebcf4f50d3d2692ab81d2c5132e425bca266" + "reference": "39582ab62f86b40e4edb698159f895929a29c346" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/96aaebcf4f50d3d2692ab81d2c5132e425bca266", - "reference": "96aaebcf4f50d3d2692ab81d2c5132e425bca266", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/39582ab62f86b40e4edb698159f895929a29c346", + "reference": "39582ab62f86b40e4edb698159f895929a29c346", "shasum": "" }, "require": { - "php": ">=5.0.0" + "php": ">=7.4" }, "require-dev": { - "phpunit/phpunit": "~4.8.36" + "friendsofphp/php-cs-fixer": "^3.14", + "phpunit/phpunit": "^9.6", + "squizlabs/php_codesniffer": "^3.7" }, "type": "library", "autoload": { - "psr-0": { - "Detection": "namespaced/" + "psr-4": { + "Detection\\": "src/" }, "classmap": [ - "Mobile_Detect.php" + "src/MobileDetect.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -43,7 +45,7 @@ { "name": "Serban Ghita", "email": "serbanghita@gmail.com", - "homepage": "http://mobiledetect.net", + "homepage": "https://mobiledetect.net", "role": "Developer" } ], @@ -58,7 +60,7 @@ ], "support": { "issues": "https://github.com/serbanghita/Mobile-Detect/issues", - "source": "https://github.com/serbanghita/Mobile-Detect/tree/2.8.45" + "source": "https://github.com/serbanghita/Mobile-Detect/tree/3.74.3" }, "funding": [ { @@ -66,7 +68,7 @@ "type": "github" } ], - "time": "2023-11-07T21:57:25+00:00" + "time": "2023-10-27T16:28:04+00:00" }, { "name": "nanasess/mdb2", diff --git a/data/class/SC_SmartphoneUserAgent.php b/data/class/SC_SmartphoneUserAgent.php index 0e4d5a66a3..22b8ea1f65 100644 --- a/data/class/SC_SmartphoneUserAgent.php +++ b/data/class/SC_SmartphoneUserAgent.php @@ -21,6 +21,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +use Detection\MobileDetect; + /** * スマートフォンの情報を扱うクラス. * @@ -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();