diff --git a/composer.lock b/composer.lock index 4f69eb6..8004938 100644 --- a/composer.lock +++ b/composer.lock @@ -421,16 +421,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.5.3", + "version": "v6.5.4", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "baeb7cde6b60b1286912690ab0693c7789a31e71" + "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/baeb7cde6b60b1286912690ab0693c7789a31e71", - "reference": "baeb7cde6b60b1286912690ab0693c7789a31e71", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c0d9f7dd3c2aa247ca44791e9209233829d82285", + "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285", "shasum": "", "mirrors": [ { @@ -449,10 +449,10 @@ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", "php-parallel-lint/php-console-highlighter": "^0.5.0", - "php-parallel-lint/php-parallel-lint": "^1.3", + "php-parallel-lint/php-parallel-lint": "^1.3.1", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.6.0", + "squizlabs/php_codesniffer": "^3.6.2", "yoast/phpunit-polyfills": "^1.0.0" }, "suggest": { @@ -493,7 +493,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.3" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.4" }, "funding": [ { @@ -501,7 +501,7 @@ "type": "github" } ], - "time": "2021-11-25T16:34:11+00:00" + "time": "2022-02-17T08:19:04+00:00" }, { "name": "psr/cache", @@ -822,12 +822,12 @@ } }, "autoload": { - "psr-4": { - "taoser\\": "src/" - }, "files": [ "src/helper.php" - ] + ], + "psr-4": { + "taoser\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -907,16 +907,16 @@ }, { "name": "topthink/framework", - "version": "v6.0.11", + "version": "v6.0.12", "source": { "type": "git", "url": "https://github.com/top-think/framework.git", - "reference": "d9cadb6971ae92ff85ba5f2be77a40b0ad5718fb" + "reference": "e478316ac843c1a884a3b3a7a94db17c4001ff5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/d9cadb6971ae92ff85ba5f2be77a40b0ad5718fb", - "reference": "d9cadb6971ae92ff85ba5f2be77a40b0ad5718fb", + "url": "https://api.github.com/repos/top-think/framework/zipball/e478316ac843c1a884a3b3a7a94db17c4001ff5c", + "reference": "e478316ac843c1a884a3b3a7a94db17c4001ff5c", "shasum": "", "mirrors": [ { @@ -974,22 +974,22 @@ ], "support": { "issues": "https://github.com/top-think/framework/issues", - "source": "https://github.com/top-think/framework/tree/v6.0.11" + "source": "https://github.com/top-think/framework/tree/v6.0.12" }, - "time": "2021-12-31T09:14:28+00:00" + "time": "2022-01-21T06:31:07+00:00" }, { "name": "topthink/think-captcha", - "version": "v3.0.3", + "version": "v3.0.4", "source": { "type": "git", "url": "https://github.com/top-think/think-captcha.git", - "reference": "1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55" + "reference": "db5be361d3cd664d236fb95d5dffe93a117283ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-captcha/zipball/1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55", - "reference": "1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55", + "url": "https://api.github.com/repos/top-think/think-captcha/zipball/db5be361d3cd664d236fb95d5dffe93a117283ad", + "reference": "db5be361d3cd664d236fb95d5dffe93a117283ad", "shasum": "", "mirrors": [ { @@ -1033,9 +1033,9 @@ "description": "captcha package for thinkphp", "support": { "issues": "https://github.com/top-think/think-captcha/issues", - "source": "https://github.com/top-think/think-captcha/tree/v3.0.3" + "source": "https://github.com/top-think/think-captcha/tree/v3.0.4" }, - "time": "2020-05-19T10:55:45+00:00" + "time": "2022-01-07T06:34:19+00:00" }, { "name": "topthink/think-helper", @@ -1196,16 +1196,16 @@ }, { "name": "topthink/think-orm", - "version": "v2.0.50", + "version": "v2.0.52", "source": { "type": "git", "url": "https://github.com/top-think/think-orm.git", - "reference": "091ad5e023c15fcce4ceaea2f3814bdf71045cde" + "reference": "407a60658f37fc57422ab95a9922c6f69af90f46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-orm/zipball/091ad5e023c15fcce4ceaea2f3814bdf71045cde", - "reference": "091ad5e023c15fcce4ceaea2f3814bdf71045cde", + "url": "https://api.github.com/repos/top-think/think-orm/zipball/407a60658f37fc57422ab95a9922c6f69af90f46", + "reference": "407a60658f37fc57422ab95a9922c6f69af90f46", "shasum": "", "mirrors": [ { @@ -1227,12 +1227,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "think\\": "src" - }, "files": [ "stubs/load_stubs.php" - ] + ], + "psr-4": { + "think\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1251,9 +1251,9 @@ ], "support": { "issues": "https://github.com/top-think/think-orm/issues", - "source": "https://github.com/top-think/think-orm/tree/v2.0.50" + "source": "https://github.com/top-think/think-orm/tree/v2.0.52" }, - "time": "2022-01-06T02:48:16+00:00" + "time": "2022-01-25T06:00:05+00:00" }, { "name": "topthink/think-template", @@ -1442,12 +1442,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1525,12 +1525,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1607,12 +1607,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -1664,16 +1664,16 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.36", + "version": "v4.4.37", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "02685c62fcbc4262235cc72a54fbd45ab719ce3c" + "reference": "e74eee4ec02de71db3d60151aa5b203c990556df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/02685c62fcbc4262235cc72a54fbd45ab719ce3c", - "reference": "02685c62fcbc4262235cc72a54fbd45ab719ce3c", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e74eee4ec02de71db3d60151aa5b203c990556df", + "reference": "e74eee4ec02de71db3d60151aa5b203c990556df", "shasum": "", "mirrors": [ { @@ -1739,7 +1739,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v4.4.36" + "source": "https://github.com/symfony/var-dumper/tree/v4.4.37" }, "funding": [ { @@ -1755,7 +1755,7 @@ "type": "tidelift" } ], - "time": "2021-12-29T09:28:53+00:00" + "time": "2022-01-02T09:41:36+00:00" }, { "name": "topthink/think-trace", diff --git a/public/robots.txt b/public/robots.txt deleted file mode 100644 index 5c3517f..0000000 --- a/public/robots.txt +++ /dev/null @@ -1,8 +0,0 @@ -User-agent: * - -Disallow: /admin/ -Disallow: /index/user/ -Disallow: /index/api/ -Disallow: /index/login.html -Disallow: /index/reg.html -Disallow: /*?* \ No newline at end of file diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 4062436..c0ad012 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -11,8 +11,8 @@ return array( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', - '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', '223fa6f9b46fbe5d6b44c5ff847bfceb' => $vendorDir . '/taoser/think-addons/src/helper.php', + '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', '1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php', 'd421242fd42b2ea6cd13f802bcf18a6e' => $baseDir . '/extend/taoler/com/form.php', ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 2c640e2..e4550ee 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -12,7 +12,7 @@ return array( 'think\\composer\\' => array($vendorDir . '/topthink/think-installer/src'), 'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'), 'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/src'), - 'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src'), + 'think\\' => array($vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-template/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/framework/src/think'), 'taoser\\think\\' => array($vendorDir . '/taoser/think-auth/src'), 'taoser\\' => array($vendorDir . '/taoser/think-addons/src'), 'phpspirit\\databackup\\' => array($vendorDir . '/lotofbadcode/phpspirit_databackup/src'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index accea89..2121b01 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -12,8 +12,8 @@ class ComposerStaticInit1b32198725235c8d6500c87262ef30c2 '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', - '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', '223fa6f9b46fbe5d6b44c5ff847bfceb' => __DIR__ . '/..' . '/taoser/think-addons/src/helper.php', + '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', '1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php', 'd421242fd42b2ea6cd13f802bcf18a6e' => __DIR__ . '/../..' . '/extend/taoler/com/form.php', ); @@ -101,10 +101,10 @@ class ComposerStaticInit1b32198725235c8d6500c87262ef30c2 ), 'think\\' => array ( - 0 => __DIR__ . '/..' . '/topthink/framework/src/think', - 1 => __DIR__ . '/..' . '/topthink/think-helper/src', + 0 => __DIR__ . '/..' . '/topthink/think-helper/src', + 1 => __DIR__ . '/..' . '/topthink/think-template/src', 2 => __DIR__ . '/..' . '/topthink/think-orm/src', - 3 => __DIR__ . '/..' . '/topthink/think-template/src', + 3 => __DIR__ . '/..' . '/topthink/framework/src/think', ), 'taoser\\think\\' => array ( diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 9dbbb00..3c3856d 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -429,17 +429,17 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.5.3", - "version_normalized": "6.5.3.0", + "version": "v6.5.4", + "version_normalized": "6.5.4.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "baeb7cde6b60b1286912690ab0693c7789a31e71" + "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/baeb7cde6b60b1286912690ab0693c7789a31e71", - "reference": "baeb7cde6b60b1286912690ab0693c7789a31e71", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c0d9f7dd3c2aa247ca44791e9209233829d82285", + "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285", "shasum": "", "mirrors": [ { @@ -458,10 +458,10 @@ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", "php-parallel-lint/php-console-highlighter": "^0.5.0", - "php-parallel-lint/php-parallel-lint": "^1.3", + "php-parallel-lint/php-parallel-lint": "^1.3.1", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.6.0", + "squizlabs/php_codesniffer": "^3.6.2", "yoast/phpunit-polyfills": "^1.0.0" }, "suggest": { @@ -472,7 +472,7 @@ "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" }, - "time": "2021-11-25T16:34:11+00:00", + "time": "2022-02-17T08:19:04+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -504,7 +504,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.3" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.4" }, "funding": [ { @@ -1075,17 +1075,17 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.36", - "version_normalized": "4.4.36.0", + "version": "v4.4.37", + "version_normalized": "4.4.37.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "02685c62fcbc4262235cc72a54fbd45ab719ce3c" + "reference": "e74eee4ec02de71db3d60151aa5b203c990556df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/02685c62fcbc4262235cc72a54fbd45ab719ce3c", - "reference": "02685c62fcbc4262235cc72a54fbd45ab719ce3c", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e74eee4ec02de71db3d60151aa5b203c990556df", + "reference": "e74eee4ec02de71db3d60151aa5b203c990556df", "shasum": "", "mirrors": [ { @@ -1115,7 +1115,7 @@ "ext-intl": "To show region name in time zone dump", "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" }, - "time": "2021-12-29T09:28:53+00:00", + "time": "2022-01-02T09:41:36+00:00", "bin": [ "Resources/bin/var-dump-server" ], @@ -1153,7 +1153,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v4.4.36" + "source": "https://github.com/symfony/var-dumper/tree/v4.4.37" }, "funding": [ { @@ -1296,17 +1296,17 @@ }, { "name": "topthink/framework", - "version": "v6.0.11", - "version_normalized": "6.0.11.0", + "version": "v6.0.12", + "version_normalized": "6.0.12.0", "source": { "type": "git", "url": "https://github.com/top-think/framework.git", - "reference": "d9cadb6971ae92ff85ba5f2be77a40b0ad5718fb" + "reference": "e478316ac843c1a884a3b3a7a94db17c4001ff5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/d9cadb6971ae92ff85ba5f2be77a40b0ad5718fb", - "reference": "d9cadb6971ae92ff85ba5f2be77a40b0ad5718fb", + "url": "https://api.github.com/repos/top-think/framework/zipball/e478316ac843c1a884a3b3a7a94db17c4001ff5c", + "reference": "e478316ac843c1a884a3b3a7a94db17c4001ff5c", "shasum": "", "mirrors": [ { @@ -1334,7 +1334,7 @@ "mockery/mockery": "^1.2", "phpunit/phpunit": "^7.0" }, - "time": "2021-12-31T09:14:28+00:00", + "time": "2022-01-21T06:31:07+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1366,23 +1366,23 @@ ], "support": { "issues": "https://github.com/top-think/framework/issues", - "source": "https://github.com/top-think/framework/tree/v6.0.11" + "source": "https://github.com/top-think/framework/tree/v6.0.12" }, "install-path": "../topthink/framework" }, { "name": "topthink/think-captcha", - "version": "v3.0.3", - "version_normalized": "3.0.3.0", + "version": "v3.0.4", + "version_normalized": "3.0.4.0", "source": { "type": "git", "url": "https://github.com/top-think/think-captcha.git", - "reference": "1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55" + "reference": "db5be361d3cd664d236fb95d5dffe93a117283ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-captcha/zipball/1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55", - "reference": "1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55", + "url": "https://api.github.com/repos/top-think/think-captcha/zipball/db5be361d3cd664d236fb95d5dffe93a117283ad", + "reference": "db5be361d3cd664d236fb95d5dffe93a117283ad", "shasum": "", "mirrors": [ { @@ -1394,7 +1394,7 @@ "require": { "topthink/framework": "^6.0.0" }, - "time": "2020-05-19T10:55:45+00:00", + "time": "2022-01-07T06:34:19+00:00", "type": "library", "extra": { "think": { @@ -1426,6 +1426,10 @@ } ], "description": "captcha package for thinkphp", + "support": { + "issues": "https://github.com/top-think/think-captcha/issues", + "source": "https://github.com/top-think/think-captcha/tree/v3.0.4" + }, "install-path": "../topthink/think-captcha" }, { @@ -1592,17 +1596,17 @@ }, { "name": "topthink/think-orm", - "version": "v2.0.50", - "version_normalized": "2.0.50.0", + "version": "v2.0.52", + "version_normalized": "2.0.52.0", "source": { "type": "git", "url": "https://github.com/top-think/think-orm.git", - "reference": "091ad5e023c15fcce4ceaea2f3814bdf71045cde" + "reference": "407a60658f37fc57422ab95a9922c6f69af90f46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-orm/zipball/091ad5e023c15fcce4ceaea2f3814bdf71045cde", - "reference": "091ad5e023c15fcce4ceaea2f3814bdf71045cde", + "url": "https://api.github.com/repos/top-think/think-orm/zipball/407a60658f37fc57422ab95a9922c6f69af90f46", + "reference": "407a60658f37fc57422ab95a9922c6f69af90f46", "shasum": "", "mirrors": [ { @@ -1622,16 +1626,16 @@ "require-dev": { "phpunit/phpunit": "^7|^8|^9.5" }, - "time": "2022-01-06T02:48:16+00:00", + "time": "2022-01-25T06:00:05+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "think\\": "src" - }, "files": [ "stubs/load_stubs.php" - ] + ], + "psr-4": { + "think\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1650,7 +1654,7 @@ ], "support": { "issues": "https://github.com/top-think/think-orm/issues", - "source": "https://github.com/top-think/think-orm/tree/v2.0.50" + "source": "https://github.com/top-think/think-orm/tree/v2.0.52" }, "install-path": "../topthink/think-orm" }, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 3280fa3..f2ac689 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '260604abd3f6eb2b7f43706b8dd2b7cc35acc93c', + 'reference' => 'e0b7efe3f2680ac9d7910e02abcd943b0cc226ec', 'name' => 'taoser/taoler', 'dev' => true, ), @@ -65,12 +65,12 @@ 'dev_requirement' => false, ), 'phpmailer/phpmailer' => array( - 'pretty_version' => 'v6.5.3', - 'version' => '6.5.3.0', + 'pretty_version' => 'v6.5.4', + 'version' => '6.5.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpmailer/phpmailer', 'aliases' => array(), - 'reference' => 'baeb7cde6b60b1286912690ab0693c7789a31e71', + 'reference' => 'c0d9f7dd3c2aa247ca44791e9209233829d82285', 'dev_requirement' => false, ), 'psr/cache' => array( @@ -146,12 +146,12 @@ 'dev_requirement' => true, ), 'symfony/var-dumper' => array( - 'pretty_version' => 'v4.4.36', - 'version' => '4.4.36.0', + 'pretty_version' => 'v4.4.37', + 'version' => '4.4.37.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-dumper', 'aliases' => array(), - 'reference' => '02685c62fcbc4262235cc72a54fbd45ab719ce3c', + 'reference' => 'e74eee4ec02de71db3d60151aa5b203c990556df', 'dev_requirement' => true, ), 'taoser/taoler' => array( @@ -160,7 +160,7 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '260604abd3f6eb2b7f43706b8dd2b7cc35acc93c', + 'reference' => 'e0b7efe3f2680ac9d7910e02abcd943b0cc226ec', 'dev_requirement' => false, ), 'taoser/think-addons' => array( @@ -182,21 +182,21 @@ 'dev_requirement' => false, ), 'topthink/framework' => array( - 'pretty_version' => 'v6.0.11', - 'version' => '6.0.11.0', + 'pretty_version' => 'v6.0.12', + 'version' => '6.0.12.0', 'type' => 'library', 'install_path' => __DIR__ . '/../topthink/framework', 'aliases' => array(), - 'reference' => 'd9cadb6971ae92ff85ba5f2be77a40b0ad5718fb', + 'reference' => 'e478316ac843c1a884a3b3a7a94db17c4001ff5c', 'dev_requirement' => false, ), 'topthink/think-captcha' => array( - 'pretty_version' => 'v3.0.3', - 'version' => '3.0.3.0', + 'pretty_version' => 'v3.0.4', + 'version' => '3.0.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../topthink/think-captcha', 'aliases' => array(), - 'reference' => '1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55', + 'reference' => 'db5be361d3cd664d236fb95d5dffe93a117283ad', 'dev_requirement' => false, ), 'topthink/think-helper' => array( @@ -227,12 +227,12 @@ 'dev_requirement' => false, ), 'topthink/think-orm' => array( - 'pretty_version' => 'v2.0.50', - 'version' => '2.0.50.0', + 'pretty_version' => 'v2.0.52', + 'version' => '2.0.52.0', 'type' => 'library', 'install_path' => __DIR__ . '/../topthink/think-orm', 'aliases' => array(), - 'reference' => '091ad5e023c15fcce4ceaea2f3814bdf71045cde', + 'reference' => '407a60658f37fc57422ab95a9922c6f69af90f46', 'dev_requirement' => false, ), 'topthink/think-template' => array( diff --git a/vendor/phpmailer/phpmailer/VERSION b/vendor/phpmailer/phpmailer/VERSION index 73092f3..c192617 100644 --- a/vendor/phpmailer/phpmailer/VERSION +++ b/vendor/phpmailer/phpmailer/VERSION @@ -1 +1 @@ -6.5.3 \ No newline at end of file +6.5.4 \ No newline at end of file diff --git a/vendor/phpmailer/phpmailer/composer.json b/vendor/phpmailer/phpmailer/composer.json index 28557f5..b13732b 100644 --- a/vendor/phpmailer/phpmailer/composer.json +++ b/vendor/phpmailer/phpmailer/composer.json @@ -25,6 +25,11 @@ "type": "github" } ], + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + }, "require": { "php": ">=5.5.0", "ext-ctype": "*", @@ -35,10 +40,10 @@ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", "php-parallel-lint/php-console-highlighter": "^0.5.0", - "php-parallel-lint/php-parallel-lint": "^1.3", + "php-parallel-lint/php-parallel-lint": "^1.3.1", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.6.0", + "squizlabs/php_codesniffer": "^3.6.2", "yoast/phpunit-polyfills": "^1.0.0" }, "suggest": { diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php index 979e44b..38a7a8e 100644 --- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php @@ -10,7 +10,7 @@ */ $PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : échec de l’authentification.'; -$PHPMAILER_LANG['buggy_php'] = 'Votre version de PHP est affectée par un bogue qui peut entraîner des messages corrompus. Pour résoudre ce problème, passez à l’envoi par SMTP, désactivez l’option mail.add_x_header dans le fichier php.ini, passez à MacOS ou Linux, ou passez PHP à la version 7.0.17+ ou 7.1.3+.'; +$PHPMAILER_LANG['buggy_php'] = 'Votre version de PHP est affectée par un bug qui peut entraîner des messages corrompus. Pour résoudre ce problème, passez à l’envoi par SMTP, désactivez l’option mail.add_x_header dans le fichier php.ini, passez à MacOS ou Linux, ou passez PHP à la version 7.0.17+ ou 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'Erreur SMTP : impossible de se connecter au serveur SMTP.'; $PHPMAILER_LANG['data_not_accepted'] = 'Erreur SMTP : données incorrectes.'; $PHPMAILER_LANG['empty_message'] = 'Corps du message vide.'; diff --git a/vendor/phpmailer/phpmailer/src/PHPMailer.php b/vendor/phpmailer/phpmailer/src/PHPMailer.php index 20972c4..19110df 100644 --- a/vendor/phpmailer/phpmailer/src/PHPMailer.php +++ b/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -750,7 +750,7 @@ class PHPMailer * * @var string */ - const VERSION = '6.5.3'; + const VERSION = '6.5.4'; /** * Error severity: message only, continue processing. @@ -1185,6 +1185,7 @@ class PHPMailer * * @param string $addrstr The address list string * @param bool $useimap Whether to use the IMAP extension to parse the list + * @param string $charset The charset to use when decoding the address list string. * * @return array */ @@ -1742,7 +1743,7 @@ class PHPMailer fwrite($mail, $header); fwrite($mail, $body); $result = pclose($mail); - $addrinfo = static::parseAddresses($toAddr, true, $this->charSet); + $addrinfo = static::parseAddresses($toAddr, true, $this->CharSet); $this->doCallback( ($result === 0), [[$addrinfo['address'], $addrinfo['name']]], @@ -1797,7 +1798,13 @@ class PHPMailer */ protected static function isShellSafe($string) { - //Future-proof + //It's not possible to use shell commands safely (which includes the mail() function) without escapeshellarg, + //but some hosting providers disable it, creating a security problem that we don't want to have to deal with, + //so we don't. + if (!function_exists('escapeshellarg') || !function_exists('escapeshellcmd')) { + return false; + } + if ( escapeshellcmd($string) !== $string || !in_array(escapeshellarg($string), ["'$string'", "\"$string\""]) @@ -1905,7 +1912,7 @@ class PHPMailer if ($this->SingleTo && count($toArr) > 1) { foreach ($toArr as $toAddr) { $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); - $addrinfo = static::parseAddresses($toAddr, true, $this->charSet); + $addrinfo = static::parseAddresses($toAddr, true, $this->CharSet); $this->doCallback( $result, [[$addrinfo['address'], $addrinfo['name']]], @@ -2630,16 +2637,15 @@ class PHPMailer $result .= $this->headerLine('X-Priority', $this->Priority); } if ('' === $this->XMailer) { + //Empty string for default X-Mailer header $result .= $this->headerLine( 'X-Mailer', 'PHPMailer ' . self::VERSION . ' (https://github.com/PHPMailer/PHPMailer)' ); - } else { - $myXmailer = trim($this->XMailer); - if ($myXmailer) { - $result .= $this->headerLine('X-Mailer', $myXmailer); - } - } + } elseif (is_string($this->XMailer) && trim($this->XMailer) !== '') { + //Some string + $result .= $this->headerLine('X-Mailer', trim($this->XMailer)); + } //Other values result in no X-Mailer header if ('' !== $this->ConfirmReadingTo) { $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>'); diff --git a/vendor/phpmailer/phpmailer/src/POP3.php b/vendor/phpmailer/phpmailer/src/POP3.php index ea5f941..6ca3e3c 100644 --- a/vendor/phpmailer/phpmailer/src/POP3.php +++ b/vendor/phpmailer/phpmailer/src/POP3.php @@ -46,7 +46,7 @@ class POP3 * * @var string */ - const VERSION = '6.5.3'; + const VERSION = '6.5.4'; /** * Default POP3 port number. diff --git a/vendor/phpmailer/phpmailer/src/SMTP.php b/vendor/phpmailer/phpmailer/src/SMTP.php index 676dba2..1381770 100644 --- a/vendor/phpmailer/phpmailer/src/SMTP.php +++ b/vendor/phpmailer/phpmailer/src/SMTP.php @@ -35,7 +35,7 @@ class SMTP * * @var string */ - const VERSION = '6.5.3'; + const VERSION = '6.5.4'; /** * SMTP line break constant. @@ -187,6 +187,7 @@ class SMTP 'SendGrid' => '/[\d]{3} Ok: queued as (.*)/', 'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/', 'Haraka' => '/[\d]{3} Message Queued \((.*)\)/', + 'Mailjet' => '/[\d]{3} OK queued as (.*)/', ]; /** diff --git a/vendor/services.php b/vendor/services.php index ed7d0c1..b8fd819 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'taoser\\addons\\Service', diff --git a/vendor/symfony/var-dumper/LICENSE b/vendor/symfony/var-dumper/LICENSE index c1f0aac..a843ec1 100644 --- a/vendor/symfony/var-dumper/LICENSE +++ b/vendor/symfony/var-dumper/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2021 Fabien Potencier +Copyright (c) 2014-2022 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/topthink/framework/src/think/App.php b/vendor/topthink/framework/src/think/App.php index 101bb6d..073a41a 100644 --- a/vendor/topthink/framework/src/think/App.php +++ b/vendor/topthink/framework/src/think/App.php @@ -39,7 +39,7 @@ use think\initializer\RegisterService; */ class App extends Container { - const VERSION = '6.0.10LTS'; + const VERSION = '6.0.12LTS'; /** * 应用调试模式 diff --git a/vendor/topthink/framework/src/think/Env.php b/vendor/topthink/framework/src/think/Env.php index 1046bc4..9e1b7f4 100644 --- a/vendor/topthink/framework/src/think/Env.php +++ b/vendor/topthink/framework/src/think/Env.php @@ -188,7 +188,7 @@ class Env implements ArrayAccess } #[\ReturnTypeWillChange] - public function offsetUnset($name) + public function offsetUnset($name): void { throw new Exception('not support: unset'); } diff --git a/vendor/topthink/framework/src/think/cache/Driver.php b/vendor/topthink/framework/src/think/cache/Driver.php index 5813c7b..37ffbc9 100644 --- a/vendor/topthink/framework/src/think/cache/Driver.php +++ b/vendor/topthink/framework/src/think/cache/Driver.php @@ -249,7 +249,7 @@ abstract class Driver implements CacheInterface, CacheHandlerInterface * @param string $data 缓存数据 * @return mixed */ - protected function unserialize(string $data) + protected function unserialize($data) { if (is_numeric($data)) { return $data; diff --git a/vendor/topthink/framework/src/think/console/input/Option.php b/vendor/topthink/framework/src/think/console/input/Option.php index 19c7e1e..d7e6514 100644 --- a/vendor/topthink/framework/src/think/console/input/Option.php +++ b/vendor/topthink/framework/src/think/console/input/Option.php @@ -18,7 +18,7 @@ namespace think\console\input; class Option { // 无需传值 - const VALUE_NONE = 1; + const VALUE_NONE = 1; // 必须传值 const VALUE_REQUIRED = 2; // 可选传值 @@ -30,13 +30,13 @@ class Option * 选项名 * @var string */ - private $name; + private $name = ''; /** * 选项短名称 * @var string */ - private $shortcut; + private $shortcut = ''; /** * 选项类型 @@ -54,7 +54,7 @@ class Option * 选项描述 * @var string */ - private $description; + private $description = ''; /** * 构造方法 @@ -76,10 +76,10 @@ class Option } if (empty($shortcut)) { - $shortcut = null; + $shortcut = ''; } - if (null !== $shortcut) { + if ('' !== $shortcut) { if (is_array($shortcut)) { $shortcut = implode('|', $shortcut); } @@ -114,7 +114,7 @@ class Option * 获取短名称 * @return string */ - public function getShortcut() + public function getShortcut(): string { return $this->shortcut; } @@ -123,7 +123,7 @@ class Option * 获取选项名 * @return string */ - public function getName() + public function getName(): string { return $this->name; } @@ -132,7 +132,7 @@ class Option * 是否可以设置值 * @return bool 类型不是 self::VALUE_NONE 的时候返回true,其他均返回false */ - public function acceptValue() + public function acceptValue(): bool { return $this->isValueRequired() || $this->isValueOptional(); } @@ -141,7 +141,7 @@ class Option * 是否必须 * @return bool 类型是 self::VALUE_REQUIRED 的时候返回true,其他均返回false */ - public function isValueRequired() + public function isValueRequired(): bool { return self::VALUE_REQUIRED === (self::VALUE_REQUIRED & $this->mode); } @@ -150,7 +150,7 @@ class Option * 是否可选 * @return bool 类型是 self::VALUE_OPTIONAL 的时候返回true,其他均返回false */ - public function isValueOptional() + public function isValueOptional(): bool { return self::VALUE_OPTIONAL === (self::VALUE_OPTIONAL & $this->mode); } @@ -159,7 +159,7 @@ class Option * 选项值是否接受数组 * @return bool 类型是 self::VALUE_IS_ARRAY 的时候返回true,其他均返回false */ - public function isArray() + public function isArray(): bool { return self::VALUE_IS_ARRAY === (self::VALUE_IS_ARRAY & $this->mode); } @@ -199,7 +199,7 @@ class Option * 获取描述文字 * @return string */ - public function getDescription() + public function getDescription(): string { return $this->description; } @@ -209,7 +209,7 @@ class Option * @param Option $option * @return bool */ - public function equals(Option $option) + public function equals(Option $option): bool { return $option->getName() === $this->getName() && $option->getShortcut() === $this->getShortcut() diff --git a/vendor/topthink/framework/src/think/route/Resource.php b/vendor/topthink/framework/src/think/route/Resource.php index bb37cb6..5185cdc 100644 --- a/vendor/topthink/framework/src/think/route/Resource.php +++ b/vendor/topthink/framework/src/think/route/Resource.php @@ -213,7 +213,7 @@ class Resource extends RuleGroup } /** - * 绑定资源模型 + * 绑定资源中间件 * @access public * @param array|string $name 资源类型或者中间件定义 * @param array|string $middleware 中间件定义 diff --git a/vendor/topthink/framework/src/think/route/Rule.php b/vendor/topthink/framework/src/think/route/Rule.php index 31b2e0e..2d864cd 100644 --- a/vendor/topthink/framework/src/think/route/Rule.php +++ b/vendor/topthink/framework/src/think/route/Rule.php @@ -532,6 +532,17 @@ abstract class Rule return $this->setOption('view', $view); } + /** + * 通过闭包检查路由是否匹配 + * @access public + * @param callable $match 闭包 + * @return $this + */ + public function match(callable $match) + { + return $this->setOption('match', $match); + } + /** * 设置路由完整匹配 * @access public @@ -694,6 +705,13 @@ abstract class Rule */ protected function checkOption(array $option, Request $request): bool { + // 检查当前路由是否匹配 + if (isset($option['match']) && is_callable($option['match'])) { + if (false === $option['match']($this, $request)) { + return false; + } + } + // 请求类型检测 if (!empty($option['method'])) { if (is_string($option['method']) && false === stripos($option['method'], $request->method())) { diff --git a/vendor/topthink/framework/src/think/route/RuleItem.php b/vendor/topthink/framework/src/think/route/RuleItem.php index 1f9aa52..e4e3246 100644 --- a/vendor/topthink/framework/src/think/route/RuleItem.php +++ b/vendor/topthink/framework/src/think/route/RuleItem.php @@ -196,7 +196,7 @@ class RuleItem extends Rule $url = $this->urlSuffixCheck($request, $url, $option); if (is_null($match)) { - $match = $this->match($url, $option, $pattern, $completeMatch); + $match = $this->checkMatch($url, $option, $pattern, $completeMatch); } if (false !== $match) { @@ -252,7 +252,7 @@ class RuleItem extends Rule * @param bool $completeMatch 是否完全匹配 * @return array|false */ - private function match(string $url, array $option, array $pattern, bool $completeMatch) + private function checkMatch(string $url, array $option, array $pattern, bool $completeMatch) { if (isset($option['complete_match'])) { $completeMatch = $option['complete_match']; diff --git a/vendor/topthink/think-captcha/src/Captcha.php b/vendor/topthink/think-captcha/src/Captcha.php index 0789087..83195f1 100644 --- a/vendor/topthink/think-captcha/src/Captcha.php +++ b/vendor/topthink/think-captcha/src/Captcha.php @@ -178,7 +178,7 @@ class Captcha // 图片高(px) $this->imageH || $this->imageH = $this->fontSize * 2.5; // 建立一幅 $this->imageW x $this->imageH 的图像 - $this->im = imagecreate($this->imageW, $this->imageH); + $this->im = imagecreate((int) $this->imageW, (int) $this->imageH); // 设置背景 imagecolorallocate($this->im, $this->bg[0], $this->bg[1], $this->bg[2]); diff --git a/vendor/topthink/think-orm/src/db/Fetch.php b/vendor/topthink/think-orm/src/db/Fetch.php index 16caed2..a997a85 100644 --- a/vendor/topthink/think-orm/src/db/Fetch.php +++ b/vendor/topthink/think-orm/src/db/Fetch.php @@ -421,10 +421,8 @@ class Fetch if (!empty($options['group'])) { // 支持GROUP - $bind = $this->query->getBind(); - $subSql = $this->query->options($options)->field('count(' . $field . ') AS think_count')->bind($bind)->buildSql(); - - $query = $this->query->newQuery()->table([$subSql => '_group_count_']); + $subSql = $this->query->field('count(' . $field . ') AS think_count')->buildSql(); + $query = $this->query->newQuery()->table([$subSql => '_group_count_']); return $query->fetchsql()->aggregate('COUNT', '*'); } else { diff --git a/vendor/topthink/think-orm/src/db/Raw.php b/vendor/topthink/think-orm/src/db/Raw.php index 833fbf0..b956ff6 100644 --- a/vendor/topthink/think-orm/src/db/Raw.php +++ b/vendor/topthink/think-orm/src/db/Raw.php @@ -64,8 +64,4 @@ class Raw return $this->bind; } - public function __toString() - { - return (string) $this->value; - } } diff --git a/vendor/topthink/think-orm/src/db/builder/Sqlite.php b/vendor/topthink/think-orm/src/db/builder/Sqlite.php index 78a307d..ff17c5d 100644 --- a/vendor/topthink/think-orm/src/db/builder/Sqlite.php +++ b/vendor/topthink/think-orm/src/db/builder/Sqlite.php @@ -24,8 +24,8 @@ class Sqlite extends Builder /** * limit * @access public - * @param Query $query 查询对象 - * @param mixed $limit + * @param Query $query 查询对象 + * @param mixed $limit * @return string */ public function parseLimit(Query $query, string $limit): string @@ -47,7 +47,7 @@ class Sqlite extends Builder /** * 随机排序 * @access protected - * @param Query $query 查询对象 + * @param Query $query 查询对象 * @return string */ protected function parseRand(Query $query): string @@ -58,9 +58,9 @@ class Sqlite extends Builder /** * 字段和表名处理 * @access public - * @param Query $query 查询对象 - * @param mixed $key 字段名 - * @param bool $strict 严格检测 + * @param Query $query 查询对象 + * @param mixed $key 字段名 + * @param bool $strict 严格检测 * @return string */ public function parseKey(Query $query, $key, bool $strict = false): string @@ -73,7 +73,7 @@ class Sqlite extends Builder $key = trim($key); - if (strpos($key, '.')) { + if (strpos($key, '.') && !preg_match('/[,\'\"\(\)`\s]/', $key)) { [$table, $key] = explode('.', $key, 2); $alias = $query->getOptions('alias'); @@ -88,8 +88,12 @@ class Sqlite extends Builder } } + if ('*' != $key && !preg_match('/[,\'\"\*\(\)`.\s]/', $key)) { + $key = '`' . $key . '`'; + } + if (isset($table)) { - $key = $table . '.' . $key; + $key = '`' . $table . '`.' . $key; } return $key; @@ -98,8 +102,8 @@ class Sqlite extends Builder /** * 设置锁机制 * @access protected - * @param Query $query 查询对象 - * @param bool|string $lock + * @param Query $query 查询对象 + * @param bool|string $lock * @return string */ protected function parseLock(Query $query, $lock = false): string diff --git a/vendor/topthink/think-orm/src/db/connector/Sqlite.php b/vendor/topthink/think-orm/src/db/connector/Sqlite.php index c664f20..3e42a90 100644 --- a/vendor/topthink/think-orm/src/db/connector/Sqlite.php +++ b/vendor/topthink/think-orm/src/db/connector/Sqlite.php @@ -42,7 +42,7 @@ class Sqlite extends PDOConnection public function getFields(string $tableName): array { [$tableName] = explode(' ', $tableName); - $sql = 'PRAGMA table_info( ' . $tableName . ' )'; + $sql = 'PRAGMA table_info( \'' . $tableName . '\' )'; $pdo = $this->getPDOStatement($sql); $result = $pdo->fetchAll(PDO::FETCH_ASSOC); diff --git a/vendor/topthink/think-orm/src/model/concern/Attribute.php b/vendor/topthink/think-orm/src/model/concern/Attribute.php index 9201f90..e4aa07b 100644 --- a/vendor/topthink/think-orm/src/model/concern/Attribute.php +++ b/vendor/topthink/think-orm/src/model/concern/Attribute.php @@ -382,6 +382,9 @@ trait Attribute } elseif (isset($this->type[$name])) { // 类型转换 $value = $this->writeTransform($value, $this->type[$name]); + } elseif (is_object($value) && method_exists($value, '__toString')) { + // 对象类型 + $value = $value->__toString(); } // 设置数据对象属性 diff --git a/vendor/topthink/think-orm/src/model/relation/BelongsTo.php b/vendor/topthink/think-orm/src/model/relation/BelongsTo.php index 941e1d4..0802b11 100644 --- a/vendor/topthink/think-orm/src/model/relation/BelongsTo.php +++ b/vendor/topthink/think-orm/src/model/relation/BelongsTo.php @@ -236,12 +236,11 @@ class BelongsTo extends OneToOne $relationModel->exists(true); } + // 设置关联属性 + $result->setRelation($relation, $relationModel); if (!empty($this->bindAttr)) { // 绑定关联属性 $this->bindAttr($result, $relationModel); - } else { - // 设置关联属性 - $result->setRelation($relation, $relationModel); } } } @@ -277,12 +276,12 @@ class BelongsTo extends OneToOne $relationModel->exists(true); } + // 设置关联属性 + $result->setRelation($relation, $relationModel); + if (!empty($this->bindAttr)) { // 绑定关联属性 $this->bindAttr($result, $relationModel); - } else { - // 设置关联属性 - $result->setRelation($relation, $relationModel); } } diff --git a/vendor/topthink/think-orm/src/model/relation/BelongsToMany.php b/vendor/topthink/think-orm/src/model/relation/BelongsToMany.php index 75eab1e..9890906 100644 --- a/vendor/topthink/think-orm/src/model/relation/BelongsToMany.php +++ b/vendor/topthink/think-orm/src/model/relation/BelongsToMany.php @@ -137,6 +137,30 @@ class BelongsToMany extends Relation ->setParent(clone $this->parent); } + /** + * 组装Pivot模型 + * @access public + * @param Model $result 模型对象 + * @return array + */ + protected function matchPivot(Model $result): array + { + $pivot = []; + foreach ($result->getData() as $key => $val) { + if (strpos($key, '__')) { + [$name, $attr] = explode('__', $key, 2); + + if ('pivot' == $name) { + $pivot[$attr] = $val; + unset($result->$key); + } + } + } + + $result->setRelation($this->pivotDataName, $this->newPivot($pivot)); + return $pivot; + } + /** * 根据关联条件查询当前模型 * @access public @@ -326,24 +350,13 @@ class BelongsToMany extends Relation // 组装模型数据 $data = []; foreach ($list as $set) { - $pivot = []; - foreach ($set->getData() as $key => $val) { - if (strpos($key, '__')) { - [$name, $attr] = explode('__', $key, 2); - if ('pivot' == $name) { - $pivot[$attr] = $val; - unset($set->$key); - } - } - } - $key = $pivot[$this->localKey]; + $pivot = $this->matchPivot($set); + $key = $pivot[$this->localKey]; if ($this->withLimit && isset($data[$key]) && count($data[$key]) >= $this->withLimit) { continue; } - $set->setRelation($this->pivotDataName, $this->newPivot($pivot)); - $data[$key][] = $set; } @@ -594,21 +607,8 @@ class BelongsToMany extends Relation $foreignKey = $this->foreignKey; $localKey = $this->localKey; - $this->query->getModel()->filter(function ($result, $options) { - $pivot = []; - - foreach ($result->getData() as $key => $val) { - if (strpos($key, '__')) { - [$name, $attr] = explode('__', $key, 2); - - if ('pivot' == $name) { - $pivot[$attr] = $val; - unset($result->$key); - } - } - } - - $result->setRelation($this->pivotDataName, $this->newPivot($pivot)); + $this->query->filter(function ($result, $options) { + $this->matchPivot($result); }); // 关联查询 diff --git a/vendor/topthink/think-orm/src/model/relation/HasManyThrough.php b/vendor/topthink/think-orm/src/model/relation/HasManyThrough.php index d4b7d91..fc62026 100644 --- a/vendor/topthink/think-orm/src/model/relation/HasManyThrough.php +++ b/vendor/topthink/think-orm/src/model/relation/HasManyThrough.php @@ -258,8 +258,14 @@ class HasManyThrough extends Relation $closure($this->getClosureType($closure)); } + $throughKey = $this->throughKey; + + if ($this->baseQuery) { + $throughKey = Str::snake(class_basename($this->model)) . "." . $this->throughKey; + } + $list = $this->query - ->where($this->throughKey, 'in', $keys) + ->where($throughKey, 'in', $keys) ->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null) ->select(); diff --git a/vendor/topthink/think-orm/src/model/relation/HasOne.php b/vendor/topthink/think-orm/src/model/relation/HasOne.php index be4927b..269f0d7 100644 --- a/vendor/topthink/think-orm/src/model/relation/HasOne.php +++ b/vendor/topthink/think-orm/src/model/relation/HasOne.php @@ -234,13 +234,12 @@ class HasOne extends OneToOne $relationModel->setParent(clone $result); $relationModel->exists(true); } + // 设置关联属性 + $result->setRelation($relation, $relationModel); if (!empty($this->bindAttr)) { // 绑定关联属性 $this->bindAttr($result, $relationModel); - } else { - // 设置关联属性 - $result->setRelation($relation, $relationModel); } } } @@ -276,11 +275,12 @@ class HasOne extends OneToOne $relationModel->exists(true); } + // 设置关联属性 + $result->setRelation($relation, $relationModel); + if (!empty($this->bindAttr)) { // 绑定关联属性 $this->bindAttr($result, $relationModel); - } else { - $result->setRelation($relation, $relationModel); } }