install sqlbug,html
This commit is contained in:
parent
aef2058421
commit
703058a13b
@ -263,7 +263,7 @@ INSERT INTO `tao_auth_rule` VALUES ('95', 'admin/Database/backup', '进行备份
|
||||
INSERT INTO `tao_auth_rule` VALUES ('96', 'admin/Database/delete', '备份删除', '', '1', '1', '94', '2', '', '0', '0', '', '1611902429', '0', '0');
|
||||
INSERT INTO `tao_auth_rule` VALUES ('97', 'addons', '插件', '', '1', '1', '0', '0', 'layui-icon-flag', '1', '2', '', '1635757328', '1635757632', '0');
|
||||
INSERT INTO `tao_auth_rule` VALUES ('98', 'admin/Addons/index', '插件市场', '', '1', '1', '97', '1', '', '1', '0', '', '1635757426', '0', '0');
|
||||
INSERT INTO `tao_auth_rule` VALUES ('99', 'admin/Addons/addonsList', '插件列表', '', '1', '1', '98', '2', '', '', '0', '', '1635758251', '0', '0');
|
||||
INSERT INTO `tao_auth_rule` VALUES ('99', 'admin/Addons/addonsList', '插件列表', '', '1', '1', '98', '2', '', '-1', '0', '', '1638775199', '0', '0');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for tao_cate
|
||||
|
90
composer.lock
generated
90
composer.lock
generated
@ -8,16 +8,16 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "firebase/php-jwt",
|
||||
"version": "v5.4.0",
|
||||
"version": "v5.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/firebase/php-jwt.git",
|
||||
"reference": "d2113d9b2e0e349796e72d2a63cf9319100382d2"
|
||||
"reference": "83b609028194aa042ea33b5af2d41a7427de80e6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/d2113d9b2e0e349796e72d2a63cf9319100382d2",
|
||||
"reference": "d2113d9b2e0e349796e72d2a63cf9319100382d2",
|
||||
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/83b609028194aa042ea33b5af2d41a7427de80e6",
|
||||
"reference": "83b609028194aa042ea33b5af2d41a7427de80e6",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -65,22 +65,22 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/firebase/php-jwt/issues",
|
||||
"source": "https://github.com/firebase/php-jwt/tree/v5.4.0"
|
||||
"source": "https://github.com/firebase/php-jwt/tree/v5.5.1"
|
||||
},
|
||||
"time": "2021-06-23T19:00:23+00:00"
|
||||
"time": "2021-11-08T20:18:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.1.5",
|
||||
"version": "1.1.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "18634df356bfd4119fe3d6156bdb990c414c14ea"
|
||||
"reference": "c995bb0c23c58c9813d081f9523c9b7bb496698e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/18634df356bfd4119fe3d6156bdb990c414c14ea",
|
||||
"reference": "18634df356bfd4119fe3d6156bdb990c414c14ea",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/c995bb0c23c58c9813d081f9523c9b7bb496698e",
|
||||
"reference": "c995bb0c23c58c9813d081f9523c9b7bb496698e",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -159,7 +159,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/1.1.5"
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/1.1.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -167,7 +167,7 @@
|
||||
"type": "other"
|
||||
}
|
||||
],
|
||||
"time": "2021-08-17T13:49:42+00:00"
|
||||
"time": "2021-11-28T21:50:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-cached-adapter",
|
||||
@ -228,16 +228,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/mime-type-detection",
|
||||
"version": "1.8.0",
|
||||
"version": "1.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||
"reference": "b38b25d7b372e9fddb00335400467b223349fd7e"
|
||||
"reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/b38b25d7b372e9fddb00335400467b223349fd7e",
|
||||
"reference": "b38b25d7b372e9fddb00335400467b223349fd7e",
|
||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/aa70e813a6ad3d1558fc927863d47309b4c23e69",
|
||||
"reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -251,7 +251,7 @@
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^2.18",
|
||||
"friendsofphp/php-cs-fixer": "^3.2",
|
||||
"phpstan/phpstan": "^0.12.68",
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.3"
|
||||
},
|
||||
@ -274,7 +274,7 @@
|
||||
"description": "Mime-type detection for Flysystem",
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/mime-type-detection/issues",
|
||||
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.8.0"
|
||||
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.9.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -286,7 +286,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-09-25T08:23:19+00:00"
|
||||
"time": "2021-11-21T11:48:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lotofbadcode/phpspirit_databackup",
|
||||
@ -340,16 +340,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.5.1",
|
||||
"version": "v6.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355"
|
||||
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/baeb7cde6b60b1286912690ab0693c7789a31e71",
|
||||
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -412,7 +412,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.1"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -420,7 +420,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-08-18T09:14:16+00:00"
|
||||
"time": "2021-11-25T16:34:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/cache",
|
||||
@ -479,16 +479,16 @@
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/container.git",
|
||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
|
||||
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
|
||||
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -498,7 +498,7 @@
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.0"
|
||||
"php": ">=7.4.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@ -527,9 +527,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/php-fig/container/issues",
|
||||
"source": "https://github.com/php-fig/container/tree/1.1.1"
|
||||
"source": "https://github.com/php-fig/container/tree/1.1.2"
|
||||
},
|
||||
"time": "2021-03-05T17:36:06+00:00"
|
||||
"time": "2021-11-05T16:50:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
@ -1000,16 +1000,16 @@
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-orm",
|
||||
"version": "v2.0.44",
|
||||
"version": "v2.0.45",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/think-orm.git",
|
||||
"reference": "5d3d5c1ebf8bfccf34bacd90edb42989b16ea409"
|
||||
"reference": "3dcf9af447b048103093840833e8c74ab849152f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/5d3d5c1ebf8bfccf34bacd90edb42989b16ea409",
|
||||
"reference": "5d3d5c1ebf8bfccf34bacd90edb42989b16ea409",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/3dcf9af447b048103093840833e8c74ab849152f",
|
||||
"reference": "3dcf9af447b048103093840833e8c74ab849152f",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -1055,9 +1055,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/top-think/think-orm/issues",
|
||||
"source": "https://github.com/top-think/think-orm/tree/v2.0.44"
|
||||
"source": "https://github.com/top-think/think-orm/tree/v2.0.45"
|
||||
},
|
||||
"time": "2021-07-21T02:22:31+00:00"
|
||||
"time": "2021-11-30T14:31:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-template",
|
||||
@ -1465,16 +1465,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v4.4.33",
|
||||
"version": "v4.4.34",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "50286e2b7189bfb4f419c0731e86632cddf7c5ee"
|
||||
"reference": "2d0c056b2faaa3d785bdbd5adecc593a5be9c16e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/50286e2b7189bfb4f419c0731e86632cddf7c5ee",
|
||||
"reference": "50286e2b7189bfb4f419c0731e86632cddf7c5ee",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2d0c056b2faaa3d785bdbd5adecc593a5be9c16e",
|
||||
"reference": "2d0c056b2faaa3d785bdbd5adecc593a5be9c16e",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -1540,7 +1540,7 @@
|
||||
"dump"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v4.4.33"
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v4.4.34"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1556,7 +1556,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-25T20:24:58+00:00"
|
||||
"time": "2021-11-12T10:50:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-trace",
|
||||
@ -1625,5 +1625,5 @@
|
||||
"php": ">=7.1.0"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.0.0"
|
||||
"plugin-api-version": "2.1.0"
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ pre{position: relative; margin: 10px 0; padding: 15px; line-height: 20px; border
|
||||
/* 专栏 */
|
||||
.fly-column{height: 50px; line-height: 50px;}
|
||||
.fly-column ul li{position: relative; display: inline-block; height: 50px;}
|
||||
.fly-column ul li a{padding: 0 20px;}
|
||||
.fly-column ul li a{padding: 0 20px; font-size: 14px;}
|
||||
.fly-column ul li.layui-this:after{ position: absolute; bottom: 13px; left: 8px; z-index: 0; width: 50px; height: 22px; border: 1px solid #5FB878; border-radius: 2px;}
|
||||
.fly-column ul li.layui-this a{color: #5FB878;}
|
||||
.fly-column ul li .fly-mid{margin: 0 20px;}
|
||||
@ -394,9 +394,9 @@ body .layui-edit-face .layui-layer-content{padding:0; background-color:#fff; co
|
||||
|
||||
/* 榜单 */
|
||||
.fly-rank{padding-bottom: 10px;}
|
||||
.fly-rank dl{position: relative; overflow: hidden; margin-left: 20px; text-align: center; font-size: 0;}
|
||||
.fly-rank dd{position: relative; width: 65px; height: 85px; margin: 10px 25px 5px 0; display:inline-block; *display:inline; *zoom:1; vertical-align:top; font-size:12px;}
|
||||
.fly-rank dd a img{width: 65px; height: 65px; border-radius: 10px;}
|
||||
.fly-rank dl{position: relative; overflow: hidden; margin-left: 10px; text-align: center; font-size: 0;}
|
||||
.fly-rank dd{position: relative; width: 55px; height: 75px; margin: 10px 15px 5px 0; display:inline-block; *display:inline; *zoom:1; vertical-align:top; font-size:12px;}
|
||||
.fly-rank dd a img{width: 55px; height: 55px; border-radius: 10px;}
|
||||
.fly-rank dd a cite{ position:absolute; bottom: 20px; left: 0; width: 100%; height:20px; line-height:20px; text-align:center; background-color:rgba(0,0,0,.2); color:#fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
.fly-rank dd a:hover cite{display: block;}
|
||||
.fly-rank dd a i{position:absolute; bottom: 0; left: 0; width: 100%; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal;}
|
||||
@ -431,14 +431,14 @@ body .layui-edit-face .layui-layer-content{padding:0; background-color:#fff; co
|
||||
|
||||
/* Detail页 */
|
||||
.detail-box{position: relative; padding-left: 20px; padding-top: 15px; padding-right: 20px; padding-bottom: 20px;}
|
||||
.detail h1{float: left; font-size: 22px; line-height: 36px; padding-bottom:10px;}
|
||||
.detail .title>h1{float: left; font-size: 22px; line-height: 36px; padding-bottom:10px;}
|
||||
.detail-box .title span {float: right; padding-right: 5px;}
|
||||
.detail .fly-avatar{position: absolute; left: 15px; top: 10px;}
|
||||
.detail .fly-avatar img{display: block; width: 45px; height: 45px; margin: 0; border-radius: 100%;}
|
||||
.detail .fly-avatar .icon-renzheng{display: inline-block; width: 15px; height: 15px; line-height: 15px; top: 25px; left: 32px; background-color: #FFB800; color: #fff; border-radius: 50%; font-size: 14px;}
|
||||
|
||||
.fly-detail-info{position: relative; margin: 10px 0 15px;}
|
||||
.fly-detail-info .layui-btn{height: 20px; line-height: 20px; vertical-align: top; border-radius: 0;}
|
||||
.fly-detail-info .layui-btn{height: 20px; line-height: 20px; border-radius: 0;}
|
||||
.fly-detail-info .layui-btn+.layui-btn{margin-left: 0;}
|
||||
.fly-detail-info .fly-list-nums{top: -3px; font-size: 16px;}
|
||||
.fly-detail-info .fly-list-nums i{padding: 0 3px 0 15px; font-size: 22px; color: #999;}
|
||||
@ -541,7 +541,7 @@ body .layui-edit-face .layui-layer-content{padding:0; background-color:#fff; co
|
||||
.jieda-body{margin: 25px 0 20px; min-height: 0; line-height: 24px; font-size:14px;}
|
||||
.jieda-body p{margin-bottom: 10px;}
|
||||
.jieda-body a{color:#4f99cf}
|
||||
.jieda-reply{position:relative;}
|
||||
.jieda-reply{position:relative; font-size: 14px}
|
||||
.jieda-reply span{padding-right:20px; color:#999; cursor:pointer;}
|
||||
.jieda-reply span:hover{color:#666;}
|
||||
.jieda-reply span i{margin-right:5px; font-size:16px;}
|
||||
|
105
vendor/bin/var-dump-server
vendored
105
vendor/bin/var-dump-server
vendored
@ -1,14 +1,97 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../symfony/var-dumper/Resources/bin" && pwd)
|
||||
/**
|
||||
* Proxy PHP file generated by Composer
|
||||
*
|
||||
* This file includes the referenced bin path (../symfony/var-dumper/Resources/bin/var-dump-server) using ob_start to remove the shebang if present
|
||||
* to prevent the shebang from being output on PHP<8
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
if [ -d /proc/cygdrive ]; then
|
||||
case $(which php) in
|
||||
$(readlink -n /proc/cygdrive)/*)
|
||||
# We are in Cygwin using Windows php, so the path must be translated
|
||||
dir=$(cygpath -m "$dir");
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
namespace Composer;
|
||||
|
||||
"${dir}/var-dump-server" "$@"
|
||||
$binPath = __DIR__ . "/" . '../symfony/var-dumper/Resources/bin/var-dump-server';
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
if (!class_exists('Composer\BinProxyWrapper')) {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BinProxyWrapper
|
||||
{
|
||||
private $handle;
|
||||
private $position;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
// get rid of composer-bin-proxy:// prefix for __FILE__ & __DIR__ resolution
|
||||
$opened_path = substr($path, 21);
|
||||
$opened_path = realpath($opened_path) ?: $opened_path;
|
||||
$this->handle = fopen($opened_path, $mode);
|
||||
$this->position = 0;
|
||||
|
||||
// remove all traces of this stream wrapper once it has been used
|
||||
stream_wrapper_unregister('composer-bin-proxy');
|
||||
|
||||
return (bool) $this->handle;
|
||||
}
|
||||
|
||||
public function stream_read($count)
|
||||
{
|
||||
$data = fread($this->handle, $count);
|
||||
|
||||
if ($this->position === 0) {
|
||||
$data = preg_replace('{^#!.*\r?\n}', '', $data);
|
||||
}
|
||||
|
||||
$this->position += strlen($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function stream_cast($castAs)
|
||||
{
|
||||
return $this->handle;
|
||||
}
|
||||
|
||||
public function stream_close()
|
||||
{
|
||||
fclose($this->handle);
|
||||
}
|
||||
|
||||
public function stream_lock($operation)
|
||||
{
|
||||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function stream_eof()
|
||||
{
|
||||
return feof($this->handle);
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
return fstat($this->handle);
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) {
|
||||
include("composer-bin-proxy://" . $binPath);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
include $binPath;
|
||||
|
151
vendor/composer/ClassLoader.php
vendored
151
vendor/composer/ClassLoader.php
vendored
@ -42,21 +42,75 @@ namespace Composer\Autoload;
|
||||
*/
|
||||
class ClassLoader
|
||||
{
|
||||
/** @var ?string */
|
||||
private $vendorDir;
|
||||
|
||||
// PSR-4
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array<string, int>>
|
||||
*/
|
||||
private $prefixLengthsPsr4 = array();
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array<int, string>>
|
||||
*/
|
||||
private $prefixDirsPsr4 = array();
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, string>
|
||||
*/
|
||||
private $fallbackDirsPsr4 = array();
|
||||
|
||||
// PSR-0
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array<string, string[]>>
|
||||
*/
|
||||
private $prefixesPsr0 = array();
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, string>
|
||||
*/
|
||||
private $fallbackDirsPsr0 = array();
|
||||
|
||||
/** @var bool */
|
||||
private $useIncludePath = false;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @psalm-var array<string, string>
|
||||
*/
|
||||
private $classMap = array();
|
||||
|
||||
/** @var bool */
|
||||
private $classMapAuthoritative = false;
|
||||
|
||||
/**
|
||||
* @var bool[]
|
||||
* @psalm-var array<string, bool>
|
||||
*/
|
||||
private $missingClasses = array();
|
||||
|
||||
/** @var ?string */
|
||||
private $apcuPrefix;
|
||||
|
||||
/**
|
||||
* @var self[]
|
||||
*/
|
||||
private static $registeredLoaders = array();
|
||||
|
||||
/**
|
||||
* @param ?string $vendorDir
|
||||
*/
|
||||
public function __construct($vendorDir = null)
|
||||
{
|
||||
$this->vendorDir = $vendorDir;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getPrefixes()
|
||||
{
|
||||
if (!empty($this->prefixesPsr0)) {
|
||||
@ -66,28 +120,47 @@ class ClassLoader
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return array<string, array<int, string>>
|
||||
*/
|
||||
public function getPrefixesPsr4()
|
||||
{
|
||||
return $this->prefixDirsPsr4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return array<string, string>
|
||||
*/
|
||||
public function getFallbackDirs()
|
||||
{
|
||||
return $this->fallbackDirsPsr0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return array<string, string>
|
||||
*/
|
||||
public function getFallbackDirsPsr4()
|
||||
{
|
||||
return $this->fallbackDirsPsr4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[] Array of classname => path
|
||||
* @psalm-var array<string, string>
|
||||
*/
|
||||
public function getClassMap()
|
||||
{
|
||||
return $this->classMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $classMap Class to filename map
|
||||
* @param string[] $classMap Class to filename map
|
||||
* @psalm-param array<string, string> $classMap
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addClassMap(array $classMap)
|
||||
{
|
||||
@ -102,9 +175,11 @@ class ClassLoader
|
||||
* Registers a set of PSR-0 directories for a given prefix, either
|
||||
* appending or prepending to the ones previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param array|string $paths The PSR-0 root directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
* @param string $prefix The prefix
|
||||
* @param string[]|string $paths The PSR-0 root directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function add($prefix, $paths, $prepend = false)
|
||||
{
|
||||
@ -147,11 +222,13 @@ class ClassLoader
|
||||
* Registers a set of PSR-4 directories for a given namespace, either
|
||||
* appending or prepending to the ones previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param array|string $paths The PSR-4 base directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param string[]|string $paths The PSR-4 base directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addPsr4($prefix, $paths, $prepend = false)
|
||||
{
|
||||
@ -195,8 +272,10 @@ class ClassLoader
|
||||
* Registers a set of PSR-0 directories for a given prefix,
|
||||
* replacing any others previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param array|string $paths The PSR-0 base directories
|
||||
* @param string $prefix The prefix
|
||||
* @param string[]|string $paths The PSR-0 base directories
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set($prefix, $paths)
|
||||
{
|
||||
@ -211,10 +290,12 @@ class ClassLoader
|
||||
* Registers a set of PSR-4 directories for a given namespace,
|
||||
* replacing any others previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param array|string $paths The PSR-4 base directories
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param string[]|string $paths The PSR-4 base directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setPsr4($prefix, $paths)
|
||||
{
|
||||
@ -234,6 +315,8 @@ class ClassLoader
|
||||
* Turns on searching the include path for class files.
|
||||
*
|
||||
* @param bool $useIncludePath
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUseIncludePath($useIncludePath)
|
||||
{
|
||||
@ -256,6 +339,8 @@ class ClassLoader
|
||||
* that have not been registered with the class map.
|
||||
*
|
||||
* @param bool $classMapAuthoritative
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setClassMapAuthoritative($classMapAuthoritative)
|
||||
{
|
||||
@ -276,6 +361,8 @@ class ClassLoader
|
||||
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
||||
*
|
||||
* @param string|null $apcuPrefix
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setApcuPrefix($apcuPrefix)
|
||||
{
|
||||
@ -296,25 +383,44 @@ class ClassLoader
|
||||
* Registers this instance as an autoloader.
|
||||
*
|
||||
* @param bool $prepend Whether to prepend the autoloader or not
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register($prepend = false)
|
||||
{
|
||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||
|
||||
if (null === $this->vendorDir) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($prepend) {
|
||||
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
||||
} else {
|
||||
unset(self::$registeredLoaders[$this->vendorDir]);
|
||||
self::$registeredLoaders[$this->vendorDir] = $this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters this instance as an autoloader.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unregister()
|
||||
{
|
||||
spl_autoload_unregister(array($this, 'loadClass'));
|
||||
|
||||
if (null !== $this->vendorDir) {
|
||||
unset(self::$registeredLoaders[$this->vendorDir]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the given class or interface.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
* @return bool|null True if loaded, null otherwise
|
||||
* @return true|null True if loaded, null otherwise
|
||||
*/
|
||||
public function loadClass($class)
|
||||
{
|
||||
@ -323,6 +429,8 @@ class ClassLoader
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -367,6 +475,21 @@ class ClassLoader
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the currently registered loaders indexed by their corresponding vendor directories.
|
||||
*
|
||||
* @return self[]
|
||||
*/
|
||||
public static function getRegisteredLoaders()
|
||||
{
|
||||
return self::$registeredLoaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $class
|
||||
* @param string $ext
|
||||
* @return string|false
|
||||
*/
|
||||
private function findFileWithExtension($class, $ext)
|
||||
{
|
||||
// PSR-4 lookup
|
||||
@ -438,6 +561,10 @@ class ClassLoader
|
||||
* Scope isolated include.
|
||||
*
|
||||
* Prevents access to $this/self from included files.
|
||||
*
|
||||
* @param string $file
|
||||
* @return void
|
||||
* @private
|
||||
*/
|
||||
function includeFile($file)
|
||||
{
|
||||
|
752
vendor/composer/InstalledVersions.php
vendored
752
vendor/composer/InstalledVersions.php
vendored
@ -1,434 +1,350 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
use Composer\Autoload\ClassLoader;
|
||||
use Composer\Semver\VersionParser;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class is copied in every Composer installed project and available to all
|
||||
*
|
||||
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
||||
*
|
||||
* To require its presence, you can require `composer-runtime-api ^2.0`
|
||||
*/
|
||||
class InstalledVersions
|
||||
{
|
||||
private static $installed = array (
|
||||
'root' =>
|
||||
array (
|
||||
'pretty_version' => '1.0.0+no-version-set',
|
||||
'version' => '1.0.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => NULL,
|
||||
'name' => 'taoser/taoler',
|
||||
),
|
||||
'versions' =>
|
||||
array (
|
||||
'firebase/php-jwt' =>
|
||||
array (
|
||||
'pretty_version' => 'v5.4.0',
|
||||
'version' => '5.4.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'd2113d9b2e0e349796e72d2a63cf9319100382d2',
|
||||
),
|
||||
'league/flysystem' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.5',
|
||||
'version' => '1.1.5.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '18634df356bfd4119fe3d6156bdb990c414c14ea',
|
||||
),
|
||||
'league/flysystem-cached-adapter' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.0',
|
||||
'version' => '1.1.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'd1925efb2207ac4be3ad0c40b8277175f99ffaff',
|
||||
),
|
||||
'league/mime-type-detection' =>
|
||||
array (
|
||||
'pretty_version' => '1.8.0',
|
||||
'version' => '1.8.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'b38b25d7b372e9fddb00335400467b223349fd7e',
|
||||
),
|
||||
'lotofbadcode/phpspirit_databackup' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.1',
|
||||
'version' => '1.1.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '2627b2e4206031731c94c8d637fb06b3b96e8860',
|
||||
),
|
||||
'phpmailer/phpmailer' =>
|
||||
array (
|
||||
'pretty_version' => 'v6.5.1',
|
||||
'version' => '6.5.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'dd803df5ad7492e1b40637f7ebd258fee5ca7355',
|
||||
),
|
||||
'psr/cache' =>
|
||||
array (
|
||||
'pretty_version' => '1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
|
||||
),
|
||||
'psr/container' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.1',
|
||||
'version' => '1.1.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf',
|
||||
),
|
||||
'psr/log' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.4',
|
||||
'version' => '1.1.4.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
|
||||
),
|
||||
'psr/simple-cache' =>
|
||||
array (
|
||||
'pretty_version' => '1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
|
||||
),
|
||||
'symfony/polyfill-mbstring' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.23.1',
|
||||
'version' => '1.23.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6',
|
||||
),
|
||||
'symfony/polyfill-php72' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.23.0',
|
||||
'version' => '1.23.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '9a142215a36a3888e30d0a9eeea9766764e96976',
|
||||
),
|
||||
'symfony/polyfill-php80' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.23.1',
|
||||
'version' => '1.23.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be',
|
||||
),
|
||||
'symfony/var-dumper' =>
|
||||
array (
|
||||
'pretty_version' => 'v4.4.33',
|
||||
'version' => '4.4.33.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '50286e2b7189bfb4f419c0731e86632cddf7c5ee',
|
||||
),
|
||||
'taoser/taoler' =>
|
||||
array (
|
||||
'pretty_version' => '1.0.0+no-version-set',
|
||||
'version' => '1.0.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => NULL,
|
||||
),
|
||||
'taoser/think-addons' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'bd8b0bfa4543fe8d2da65355c134250f78c0d457',
|
||||
),
|
||||
'taoser/think-auth' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0.0',
|
||||
'version' => '1.0.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '19bb04e4fb957a95ff3fdc142939922c19167b43',
|
||||
),
|
||||
'topthink/framework' =>
|
||||
array (
|
||||
'pretty_version' => 'v6.0.9',
|
||||
'version' => '6.0.9.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0b5fb453f0e533de3af3a1ab6a202510b61be617',
|
||||
),
|
||||
'topthink/think-captcha' =>
|
||||
array (
|
||||
'pretty_version' => 'v3.0.3',
|
||||
'version' => '3.0.3.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55',
|
||||
),
|
||||
'topthink/think-helper' =>
|
||||
array (
|
||||
'pretty_version' => 'v3.1.5',
|
||||
'version' => '3.1.5.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905',
|
||||
),
|
||||
'topthink/think-multi-app' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0.14',
|
||||
'version' => '1.0.14.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
|
||||
),
|
||||
'topthink/think-orm' =>
|
||||
array (
|
||||
'pretty_version' => 'v2.0.44',
|
||||
'version' => '2.0.44.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '5d3d5c1ebf8bfccf34bacd90edb42989b16ea409',
|
||||
),
|
||||
'topthink/think-template' =>
|
||||
array (
|
||||
'pretty_version' => 'v2.0.8',
|
||||
'version' => '2.0.8.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'abfc293f74f9ef5127b5c416310a01fe42e59368',
|
||||
),
|
||||
'topthink/think-trace' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.4',
|
||||
'version' => '1.4.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '9a9fa8f767b6c66c5a133ad21ca1bc96ad329444',
|
||||
),
|
||||
'topthink/think-view' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0.14',
|
||||
'version' => '1.0.14.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d',
|
||||
),
|
||||
'wamkj/thinkphp6.0-databackup' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0',
|
||||
'version' => '1.0.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '28a0e406d827132942723a3c9f69bb20c98e652f',
|
||||
),
|
||||
),
|
||||
);
|
||||
/**
|
||||
* @var mixed[]|null
|
||||
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
|
||||
*/
|
||||
private static $installed;
|
||||
|
||||
/**
|
||||
* @var bool|null
|
||||
*/
|
||||
private static $canGetVendors;
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
||||
*/
|
||||
private static $installedByVendor = array();
|
||||
|
||||
/**
|
||||
* Returns a list of all package names which are present, either by being installed, replaced or provided
|
||||
*
|
||||
* @return string[]
|
||||
* @psalm-return list<string>
|
||||
*/
|
||||
public static function getInstalledPackages()
|
||||
{
|
||||
$packages = array();
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
$packages[] = array_keys($installed['versions']);
|
||||
}
|
||||
|
||||
if (1 === \count($packages)) {
|
||||
return $packages[0];
|
||||
}
|
||||
|
||||
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all package names with a specific type e.g. 'library'
|
||||
*
|
||||
* @param string $type
|
||||
* @return string[]
|
||||
* @psalm-return list<string>
|
||||
*/
|
||||
public static function getInstalledPackagesByType($type)
|
||||
{
|
||||
$packagesByType = array();
|
||||
|
||||
public static function getInstalledPackages()
|
||||
{
|
||||
return array_keys(self::$installed['versions']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function isInstalled($packageName)
|
||||
{
|
||||
return isset(self::$installed['versions'][$packageName]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
||||
{
|
||||
$constraint = $parser->parseConstraints($constraint);
|
||||
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
||||
|
||||
return $provided->matches($constraint);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getVersionRanges($packageName)
|
||||
{
|
||||
if (!isset(self::$installed['versions'][$packageName])) {
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
$ranges = array();
|
||||
if (isset(self::$installed['versions'][$packageName]['pretty_version'])) {
|
||||
$ranges[] = self::$installed['versions'][$packageName]['pretty_version'];
|
||||
}
|
||||
if (array_key_exists('aliases', self::$installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']);
|
||||
}
|
||||
if (array_key_exists('replaced', self::$installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']);
|
||||
}
|
||||
if (array_key_exists('provided', self::$installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']);
|
||||
}
|
||||
|
||||
return implode(' || ', $ranges);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getVersion($packageName)
|
||||
{
|
||||
if (!isset(self::$installed['versions'][$packageName])) {
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
if (!isset(self::$installed['versions'][$packageName]['version'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return self::$installed['versions'][$packageName]['version'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getPrettyVersion($packageName)
|
||||
{
|
||||
if (!isset(self::$installed['versions'][$packageName])) {
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return self::$installed['versions'][$packageName]['pretty_version'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getReference($packageName)
|
||||
{
|
||||
if (!isset(self::$installed['versions'][$packageName])) {
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
if (!isset(self::$installed['versions'][$packageName]['reference'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return self::$installed['versions'][$packageName]['reference'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getRootPackage()
|
||||
{
|
||||
return self::$installed['root'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getRawData()
|
||||
{
|
||||
return self::$installed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function reload($data)
|
||||
{
|
||||
self::$installed = $data;
|
||||
}
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
foreach ($installed['versions'] as $name => $package) {
|
||||
if (isset($package['type']) && $package['type'] === $type) {
|
||||
$packagesByType[] = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $packagesByType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given package is installed
|
||||
*
|
||||
* This also returns true if the package name is provided or replaced by another package
|
||||
*
|
||||
* @param string $packageName
|
||||
* @param bool $includeDevRequirements
|
||||
* @return bool
|
||||
*/
|
||||
public static function isInstalled($packageName, $includeDevRequirements = true)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (isset($installed['versions'][$packageName])) {
|
||||
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given package satisfies a version constraint
|
||||
*
|
||||
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
|
||||
*
|
||||
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
|
||||
*
|
||||
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
||||
* @param string $packageName
|
||||
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
|
||||
* @return bool
|
||||
*/
|
||||
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
||||
{
|
||||
$constraint = $parser->parseConstraints($constraint);
|
||||
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
||||
|
||||
return $provided->matches($constraint);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a version constraint representing all the range(s) which are installed for a given package
|
||||
*
|
||||
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
|
||||
* whether a given version of a package is installed, and not just whether it exists
|
||||
*
|
||||
* @param string $packageName
|
||||
* @return string Version constraint usable with composer/semver
|
||||
*/
|
||||
public static function getVersionRanges($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$ranges = array();
|
||||
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
||||
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
||||
}
|
||||
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
||||
}
|
||||
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
||||
}
|
||||
if (array_key_exists('provided', $installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
||||
}
|
||||
|
||||
return implode(' || ', $ranges);
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
||||
*/
|
||||
public static function getVersion($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($installed['versions'][$packageName]['version'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $installed['versions'][$packageName]['version'];
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
||||
*/
|
||||
public static function getPrettyVersion($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $installed['versions'][$packageName]['pretty_version'];
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
|
||||
*/
|
||||
public static function getReference($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($installed['versions'][$packageName]['reference'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $installed['versions'][$packageName]['reference'];
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
|
||||
*/
|
||||
public static function getInstallPath($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
|
||||
*/
|
||||
public static function getRootPackage()
|
||||
{
|
||||
$installed = self::getInstalled();
|
||||
|
||||
return $installed[0]['root'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the raw installed.php data for custom implementations
|
||||
*
|
||||
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
||||
* @return array[]
|
||||
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
|
||||
*/
|
||||
public static function getRawData()
|
||||
{
|
||||
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
|
||||
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
self::$installed = include __DIR__ . '/installed.php';
|
||||
} else {
|
||||
self::$installed = array();
|
||||
}
|
||||
}
|
||||
|
||||
return self::$installed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
||||
*
|
||||
* @return array[]
|
||||
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
||||
*/
|
||||
public static function getAllRawData()
|
||||
{
|
||||
return self::getInstalled();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lets you reload the static array from another file
|
||||
*
|
||||
* This is only useful for complex integrations in which a project needs to use
|
||||
* this class but then also needs to execute another project's autoloader in process,
|
||||
* and wants to ensure both projects have access to their version of installed.php.
|
||||
*
|
||||
* A typical case would be PHPUnit, where it would need to make sure it reads all
|
||||
* the data it needs from this class, then call reload() with
|
||||
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
|
||||
* the project in which it runs can then also use this class safely, without
|
||||
* interference between PHPUnit's dependencies and the project's dependencies.
|
||||
*
|
||||
* @param array[] $data A vendor/composer/installed.php data set
|
||||
* @return void
|
||||
*
|
||||
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
|
||||
*/
|
||||
public static function reload($data)
|
||||
{
|
||||
self::$installed = $data;
|
||||
self::$installedByVendor = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
||||
*/
|
||||
private static function getInstalled()
|
||||
{
|
||||
if (null === self::$canGetVendors) {
|
||||
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
|
||||
}
|
||||
|
||||
$installed = array();
|
||||
|
||||
if (self::$canGetVendors) {
|
||||
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
||||
if (isset(self::$installedByVendor[$vendorDir])) {
|
||||
$installed[] = self::$installedByVendor[$vendorDir];
|
||||
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
||||
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
|
||||
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
|
||||
self::$installed = $installed[count($installed) - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
self::$installed = require __DIR__ . '/installed.php';
|
||||
} else {
|
||||
self::$installed = array();
|
||||
}
|
||||
}
|
||||
$installed[] = self::$installed;
|
||||
|
||||
return $installed;
|
||||
}
|
||||
}
|
||||
|
2
vendor/composer/autoload_files.php
vendored
2
vendor/composer/autoload_files.php
vendored
@ -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',
|
||||
'1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
|
||||
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
|
||||
'd421242fd42b2ea6cd13f802bcf18a6e' => $baseDir . '/extend/taoler/com/form.php',
|
||||
);
|
||||
|
2
vendor/composer/autoload_real.php
vendored
2
vendor/composer/autoload_real.php
vendored
@ -25,7 +25,7 @@ class ComposerAutoloaderInit1b32198725235c8d6500c87262ef30c2
|
||||
require __DIR__ . '/platform_check.php';
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit1b32198725235c8d6500c87262ef30c2', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit1b32198725235c8d6500c87262ef30c2', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
|
2
vendor/composer/autoload_static.php
vendored
2
vendor/composer/autoload_static.php
vendored
@ -12,9 +12,9 @@ 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',
|
||||
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
|
||||
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
|
||||
'd421242fd42b2ea6cd13f802bcf18a6e' => __DIR__ . '/../..' . '/extend/taoler/com/form.php',
|
||||
);
|
||||
|
||||
|
111
vendor/composer/installed.json
vendored
111
vendor/composer/installed.json
vendored
@ -2,17 +2,17 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "firebase/php-jwt",
|
||||
"version": "v5.4.0",
|
||||
"version_normalized": "5.4.0.0",
|
||||
"version": "v5.5.1",
|
||||
"version_normalized": "5.5.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/firebase/php-jwt.git",
|
||||
"reference": "d2113d9b2e0e349796e72d2a63cf9319100382d2"
|
||||
"reference": "83b609028194aa042ea33b5af2d41a7427de80e6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/d2113d9b2e0e349796e72d2a63cf9319100382d2",
|
||||
"reference": "d2113d9b2e0e349796e72d2a63cf9319100382d2",
|
||||
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/83b609028194aa042ea33b5af2d41a7427de80e6",
|
||||
"reference": "83b609028194aa042ea33b5af2d41a7427de80e6",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -30,7 +30,7 @@
|
||||
"suggest": {
|
||||
"paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
|
||||
},
|
||||
"time": "2021-06-23T19:00:23+00:00",
|
||||
"time": "2021-11-08T20:18:51+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -62,23 +62,23 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/firebase/php-jwt/issues",
|
||||
"source": "https://github.com/firebase/php-jwt/tree/v5.4.0"
|
||||
"source": "https://github.com/firebase/php-jwt/tree/v5.5.1"
|
||||
},
|
||||
"install-path": "../firebase/php-jwt"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.1.5",
|
||||
"version_normalized": "1.1.5.0",
|
||||
"version": "1.1.8",
|
||||
"version_normalized": "1.1.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "18634df356bfd4119fe3d6156bdb990c414c14ea"
|
||||
"reference": "c995bb0c23c58c9813d081f9523c9b7bb496698e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/18634df356bfd4119fe3d6156bdb990c414c14ea",
|
||||
"reference": "18634df356bfd4119fe3d6156bdb990c414c14ea",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/c995bb0c23c58c9813d081f9523c9b7bb496698e",
|
||||
"reference": "c995bb0c23c58c9813d081f9523c9b7bb496698e",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -114,7 +114,7 @@
|
||||
"spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
|
||||
"srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
|
||||
},
|
||||
"time": "2021-08-17T13:49:42+00:00",
|
||||
"time": "2021-11-28T21:50:23+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@ -159,7 +159,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/1.1.5"
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/1.1.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -227,17 +227,17 @@
|
||||
},
|
||||
{
|
||||
"name": "league/mime-type-detection",
|
||||
"version": "1.8.0",
|
||||
"version_normalized": "1.8.0.0",
|
||||
"version": "1.9.0",
|
||||
"version_normalized": "1.9.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||
"reference": "b38b25d7b372e9fddb00335400467b223349fd7e"
|
||||
"reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/b38b25d7b372e9fddb00335400467b223349fd7e",
|
||||
"reference": "b38b25d7b372e9fddb00335400467b223349fd7e",
|
||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/aa70e813a6ad3d1558fc927863d47309b4c23e69",
|
||||
"reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -251,11 +251,11 @@
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^2.18",
|
||||
"friendsofphp/php-cs-fixer": "^3.2",
|
||||
"phpstan/phpstan": "^0.12.68",
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.3"
|
||||
},
|
||||
"time": "2021-09-25T08:23:19+00:00",
|
||||
"time": "2021-11-21T11:48:40+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -276,7 +276,7 @@
|
||||
"description": "Mime-type detection for Flysystem",
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/mime-type-detection/issues",
|
||||
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.8.0"
|
||||
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.9.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -345,17 +345,17 @@
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.5.1",
|
||||
"version_normalized": "6.5.1.0",
|
||||
"version": "v6.5.3",
|
||||
"version_normalized": "6.5.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355"
|
||||
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/baeb7cde6b60b1286912690ab0693c7789a31e71",
|
||||
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -388,7 +388,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-08-18T09:14:16+00:00",
|
||||
"time": "2021-11-25T16:34:11+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -420,7 +420,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.1"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -487,17 +487,17 @@
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
"version": "1.1.1",
|
||||
"version_normalized": "1.1.1.0",
|
||||
"version": "1.1.2",
|
||||
"version_normalized": "1.1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/container.git",
|
||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
|
||||
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
|
||||
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -507,9 +507,9 @@
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.0"
|
||||
"php": ">=7.4.0"
|
||||
},
|
||||
"time": "2021-03-05T17:36:06+00:00",
|
||||
"time": "2021-11-05T16:50:12+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -538,7 +538,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/php-fig/container/issues",
|
||||
"source": "https://github.com/php-fig/container/tree/1.1.1"
|
||||
"source": "https://github.com/php-fig/container/tree/1.1.2"
|
||||
},
|
||||
"install-path": "../psr/container"
|
||||
},
|
||||
@ -926,17 +926,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v4.4.33",
|
||||
"version_normalized": "4.4.33.0",
|
||||
"version": "v4.4.34",
|
||||
"version_normalized": "4.4.34.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "50286e2b7189bfb4f419c0731e86632cddf7c5ee"
|
||||
"reference": "2d0c056b2faaa3d785bdbd5adecc593a5be9c16e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/50286e2b7189bfb4f419c0731e86632cddf7c5ee",
|
||||
"reference": "50286e2b7189bfb4f419c0731e86632cddf7c5ee",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2d0c056b2faaa3d785bdbd5adecc593a5be9c16e",
|
||||
"reference": "2d0c056b2faaa3d785bdbd5adecc593a5be9c16e",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -966,7 +966,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-10-25T20:24:58+00:00",
|
||||
"time": "2021-11-12T10:50:54+00:00",
|
||||
"bin": [
|
||||
"Resources/bin/var-dump-server"
|
||||
],
|
||||
@ -1004,7 +1004,7 @@
|
||||
"dump"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v4.4.33"
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v4.4.34"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1384,17 +1384,17 @@
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-orm",
|
||||
"version": "v2.0.44",
|
||||
"version_normalized": "2.0.44.0",
|
||||
"version": "v2.0.45",
|
||||
"version_normalized": "2.0.45.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/think-orm.git",
|
||||
"reference": "5d3d5c1ebf8bfccf34bacd90edb42989b16ea409"
|
||||
"reference": "3dcf9af447b048103093840833e8c74ab849152f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/5d3d5c1ebf8bfccf34bacd90edb42989b16ea409",
|
||||
"reference": "5d3d5c1ebf8bfccf34bacd90edb42989b16ea409",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/3dcf9af447b048103093840833e8c74ab849152f",
|
||||
"reference": "3dcf9af447b048103093840833e8c74ab849152f",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -1414,7 +1414,7 @@
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7|^8|^9.5"
|
||||
},
|
||||
"time": "2021-07-21T02:22:31+00:00",
|
||||
"time": "2021-11-30T14:31:05+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -1442,7 +1442,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/top-think/think-orm/issues",
|
||||
"source": "https://github.com/top-think/think-orm/tree/v2.0.44"
|
||||
"source": "https://github.com/top-think/think-orm/tree/v2.0.45"
|
||||
},
|
||||
"install-path": "../topthink/think-orm"
|
||||
},
|
||||
@ -1653,5 +1653,12 @@
|
||||
"install-path": "../wamkj/thinkphp6.0-databackup"
|
||||
}
|
||||
],
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"dev-package-names": [
|
||||
"symfony/polyfill-mbstring",
|
||||
"symfony/polyfill-php72",
|
||||
"symfony/polyfill-php80",
|
||||
"symfony/var-dumper",
|
||||
"topthink/think-trace"
|
||||
]
|
||||
}
|
||||
|
491
vendor/composer/installed.php
vendored
491
vendor/composer/installed.php
vendored
@ -1,249 +1,248 @@
|
||||
<?php return array (
|
||||
'root' =>
|
||||
array (
|
||||
'pretty_version' => '1.0.0+no-version-set',
|
||||
'version' => '1.0.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'pretty_version' => '1.0.0+no-version-set',
|
||||
'version' => '1.0.0.0',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => NULL,
|
||||
'name' => 'taoser/taoler',
|
||||
'dev' => true,
|
||||
),
|
||||
'reference' => NULL,
|
||||
'name' => 'taoser/taoler',
|
||||
),
|
||||
'versions' =>
|
||||
array (
|
||||
'firebase/php-jwt' =>
|
||||
array (
|
||||
'pretty_version' => 'v5.4.0',
|
||||
'version' => '5.4.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'd2113d9b2e0e349796e72d2a63cf9319100382d2',
|
||||
'versions' => array(
|
||||
'firebase/php-jwt' => array(
|
||||
'pretty_version' => 'v5.5.1',
|
||||
'version' => '5.5.1.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../firebase/php-jwt',
|
||||
'aliases' => array(),
|
||||
'reference' => '83b609028194aa042ea33b5af2d41a7427de80e6',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'league/flysystem' => array(
|
||||
'pretty_version' => '1.1.8',
|
||||
'version' => '1.1.8.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../league/flysystem',
|
||||
'aliases' => array(),
|
||||
'reference' => 'c995bb0c23c58c9813d081f9523c9b7bb496698e',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'league/flysystem-cached-adapter' => array(
|
||||
'pretty_version' => '1.1.0',
|
||||
'version' => '1.1.0.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../league/flysystem-cached-adapter',
|
||||
'aliases' => array(),
|
||||
'reference' => 'd1925efb2207ac4be3ad0c40b8277175f99ffaff',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'league/mime-type-detection' => array(
|
||||
'pretty_version' => '1.9.0',
|
||||
'version' => '1.9.0.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../league/mime-type-detection',
|
||||
'aliases' => array(),
|
||||
'reference' => 'aa70e813a6ad3d1558fc927863d47309b4c23e69',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'lotofbadcode/phpspirit_databackup' => array(
|
||||
'pretty_version' => 'v1.1',
|
||||
'version' => '1.1.0.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../lotofbadcode/phpspirit_databackup',
|
||||
'aliases' => array(),
|
||||
'reference' => '2627b2e4206031731c94c8d637fb06b3b96e8860',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'phpmailer/phpmailer' => array(
|
||||
'pretty_version' => 'v6.5.3',
|
||||
'version' => '6.5.3.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
|
||||
'aliases' => array(),
|
||||
'reference' => 'baeb7cde6b60b1286912690ab0693c7789a31e71',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/cache' => array(
|
||||
'pretty_version' => '1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/cache',
|
||||
'aliases' => array(),
|
||||
'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/container' => array(
|
||||
'pretty_version' => '1.1.2',
|
||||
'version' => '1.1.2.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/container',
|
||||
'aliases' => array(),
|
||||
'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/log' => array(
|
||||
'pretty_version' => '1.1.4',
|
||||
'version' => '1.1.4.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/log',
|
||||
'aliases' => array(),
|
||||
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/simple-cache' => array(
|
||||
'pretty_version' => '1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/simple-cache',
|
||||
'aliases' => array(),
|
||||
'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-mbstring' => array(
|
||||
'pretty_version' => 'v1.23.1',
|
||||
'version' => '1.23.1.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
|
||||
'aliases' => array(),
|
||||
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6',
|
||||
'dev_requirement' => true,
|
||||
),
|
||||
'symfony/polyfill-php72' => array(
|
||||
'pretty_version' => 'v1.23.0',
|
||||
'version' => '1.23.0.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-php72',
|
||||
'aliases' => array(),
|
||||
'reference' => '9a142215a36a3888e30d0a9eeea9766764e96976',
|
||||
'dev_requirement' => true,
|
||||
),
|
||||
'symfony/polyfill-php80' => array(
|
||||
'pretty_version' => 'v1.23.1',
|
||||
'version' => '1.23.1.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-php80',
|
||||
'aliases' => array(),
|
||||
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be',
|
||||
'dev_requirement' => true,
|
||||
),
|
||||
'symfony/var-dumper' => array(
|
||||
'pretty_version' => 'v4.4.34',
|
||||
'version' => '4.4.34.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/var-dumper',
|
||||
'aliases' => array(),
|
||||
'reference' => '2d0c056b2faaa3d785bdbd5adecc593a5be9c16e',
|
||||
'dev_requirement' => true,
|
||||
),
|
||||
'taoser/taoler' => array(
|
||||
'pretty_version' => '1.0.0+no-version-set',
|
||||
'version' => '1.0.0.0',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => NULL,
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'taoser/think-addons' => array(
|
||||
'pretty_version' => 'v1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../taoser/think-addons',
|
||||
'aliases' => array(),
|
||||
'reference' => 'bd8b0bfa4543fe8d2da65355c134250f78c0d457',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'taoser/think-auth' => array(
|
||||
'pretty_version' => 'v1.0.0',
|
||||
'version' => '1.0.0.0',
|
||||
'type' => 'think-extend',
|
||||
'install_path' => __DIR__ . '/../taoser/think-auth',
|
||||
'aliases' => array(),
|
||||
'reference' => '19bb04e4fb957a95ff3fdc142939922c19167b43',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/framework' => array(
|
||||
'pretty_version' => 'v6.0.9',
|
||||
'version' => '6.0.9.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/framework',
|
||||
'aliases' => array(),
|
||||
'reference' => '0b5fb453f0e533de3af3a1ab6a202510b61be617',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think-captcha' => array(
|
||||
'pretty_version' => 'v3.0.3',
|
||||
'version' => '3.0.3.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-captcha',
|
||||
'aliases' => array(),
|
||||
'reference' => '1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think-helper' => array(
|
||||
'pretty_version' => 'v3.1.5',
|
||||
'version' => '3.1.5.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-helper',
|
||||
'aliases' => array(),
|
||||
'reference' => 'f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think-multi-app' => array(
|
||||
'pretty_version' => 'v1.0.14',
|
||||
'version' => '1.0.14.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-multi-app',
|
||||
'aliases' => array(),
|
||||
'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think-orm' => array(
|
||||
'pretty_version' => 'v2.0.45',
|
||||
'version' => '2.0.45.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-orm',
|
||||
'aliases' => array(),
|
||||
'reference' => '3dcf9af447b048103093840833e8c74ab849152f',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think-template' => array(
|
||||
'pretty_version' => 'v2.0.8',
|
||||
'version' => '2.0.8.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-template',
|
||||
'aliases' => array(),
|
||||
'reference' => 'abfc293f74f9ef5127b5c416310a01fe42e59368',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think-trace' => array(
|
||||
'pretty_version' => 'v1.4',
|
||||
'version' => '1.4.0.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-trace',
|
||||
'aliases' => array(),
|
||||
'reference' => '9a9fa8f767b6c66c5a133ad21ca1bc96ad329444',
|
||||
'dev_requirement' => true,
|
||||
),
|
||||
'topthink/think-view' => array(
|
||||
'pretty_version' => 'v1.0.14',
|
||||
'version' => '1.0.14.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-view',
|
||||
'aliases' => array(),
|
||||
'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'wamkj/thinkphp6.0-databackup' => array(
|
||||
'pretty_version' => 'v1.0',
|
||||
'version' => '1.0.0.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../wamkj/thinkphp6.0-databackup',
|
||||
'aliases' => array(),
|
||||
'reference' => '28a0e406d827132942723a3c9f69bb20c98e652f',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
),
|
||||
'league/flysystem' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.5',
|
||||
'version' => '1.1.5.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '18634df356bfd4119fe3d6156bdb990c414c14ea',
|
||||
),
|
||||
'league/flysystem-cached-adapter' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.0',
|
||||
'version' => '1.1.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'd1925efb2207ac4be3ad0c40b8277175f99ffaff',
|
||||
),
|
||||
'league/mime-type-detection' =>
|
||||
array (
|
||||
'pretty_version' => '1.8.0',
|
||||
'version' => '1.8.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'b38b25d7b372e9fddb00335400467b223349fd7e',
|
||||
),
|
||||
'lotofbadcode/phpspirit_databackup' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.1',
|
||||
'version' => '1.1.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '2627b2e4206031731c94c8d637fb06b3b96e8860',
|
||||
),
|
||||
'phpmailer/phpmailer' =>
|
||||
array (
|
||||
'pretty_version' => 'v6.5.1',
|
||||
'version' => '6.5.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'dd803df5ad7492e1b40637f7ebd258fee5ca7355',
|
||||
),
|
||||
'psr/cache' =>
|
||||
array (
|
||||
'pretty_version' => '1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
|
||||
),
|
||||
'psr/container' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.1',
|
||||
'version' => '1.1.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf',
|
||||
),
|
||||
'psr/log' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.4',
|
||||
'version' => '1.1.4.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
|
||||
),
|
||||
'psr/simple-cache' =>
|
||||
array (
|
||||
'pretty_version' => '1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
|
||||
),
|
||||
'symfony/polyfill-mbstring' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.23.1',
|
||||
'version' => '1.23.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6',
|
||||
),
|
||||
'symfony/polyfill-php72' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.23.0',
|
||||
'version' => '1.23.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '9a142215a36a3888e30d0a9eeea9766764e96976',
|
||||
),
|
||||
'symfony/polyfill-php80' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.23.1',
|
||||
'version' => '1.23.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be',
|
||||
),
|
||||
'symfony/var-dumper' =>
|
||||
array (
|
||||
'pretty_version' => 'v4.4.33',
|
||||
'version' => '4.4.33.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '50286e2b7189bfb4f419c0731e86632cddf7c5ee',
|
||||
),
|
||||
'taoser/taoler' =>
|
||||
array (
|
||||
'pretty_version' => '1.0.0+no-version-set',
|
||||
'version' => '1.0.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => NULL,
|
||||
),
|
||||
'taoser/think-addons' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'bd8b0bfa4543fe8d2da65355c134250f78c0d457',
|
||||
),
|
||||
'taoser/think-auth' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0.0',
|
||||
'version' => '1.0.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '19bb04e4fb957a95ff3fdc142939922c19167b43',
|
||||
),
|
||||
'topthink/framework' =>
|
||||
array (
|
||||
'pretty_version' => 'v6.0.9',
|
||||
'version' => '6.0.9.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0b5fb453f0e533de3af3a1ab6a202510b61be617',
|
||||
),
|
||||
'topthink/think-captcha' =>
|
||||
array (
|
||||
'pretty_version' => 'v3.0.3',
|
||||
'version' => '3.0.3.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55',
|
||||
),
|
||||
'topthink/think-helper' =>
|
||||
array (
|
||||
'pretty_version' => 'v3.1.5',
|
||||
'version' => '3.1.5.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905',
|
||||
),
|
||||
'topthink/think-multi-app' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0.14',
|
||||
'version' => '1.0.14.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
|
||||
),
|
||||
'topthink/think-orm' =>
|
||||
array (
|
||||
'pretty_version' => 'v2.0.44',
|
||||
'version' => '2.0.44.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '5d3d5c1ebf8bfccf34bacd90edb42989b16ea409',
|
||||
),
|
||||
'topthink/think-template' =>
|
||||
array (
|
||||
'pretty_version' => 'v2.0.8',
|
||||
'version' => '2.0.8.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'abfc293f74f9ef5127b5c416310a01fe42e59368',
|
||||
),
|
||||
'topthink/think-trace' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.4',
|
||||
'version' => '1.4.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '9a9fa8f767b6c66c5a133ad21ca1bc96ad329444',
|
||||
),
|
||||
'topthink/think-view' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0.14',
|
||||
'version' => '1.0.14.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d',
|
||||
),
|
||||
'wamkj/thinkphp6.0-databackup' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.0',
|
||||
'version' => '1.0.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '28a0e406d827132942723a3c9f69bb20c98e652f',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
33
vendor/composer/platform_check.php
vendored
33
vendor/composer/platform_check.php
vendored
@ -4,24 +4,23 @@
|
||||
|
||||
$issues = array();
|
||||
|
||||
if (!(PHP_VERSION_ID >= 70205)) {
|
||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.';
|
||||
}
|
||||
|
||||
$missingExtensions = array();
|
||||
extension_loaded('ctype') || $missingExtensions[] = 'ctype';
|
||||
extension_loaded('fileinfo') || $missingExtensions[] = 'fileinfo';
|
||||
extension_loaded('filter') || $missingExtensions[] = 'filter';
|
||||
extension_loaded('hash') || $missingExtensions[] = 'hash';
|
||||
extension_loaded('json') || $missingExtensions[] = 'json';
|
||||
extension_loaded('mbstring') || $missingExtensions[] = 'mbstring';
|
||||
extension_loaded('pdo') || $missingExtensions[] = 'pdo';
|
||||
|
||||
if ($missingExtensions) {
|
||||
$issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions);
|
||||
if (!(PHP_VERSION_ID >= 70400)) {
|
||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
|
||||
}
|
||||
|
||||
if ($issues) {
|
||||
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues);
|
||||
exit(104);
|
||||
if (!headers_sent()) {
|
||||
header('HTTP/1.1 500 Internal Server Error');
|
||||
}
|
||||
if (!ini_get('display_errors')) {
|
||||
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
||||
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
|
||||
} elseif (!headers_sent()) {
|
||||
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
||||
}
|
||||
}
|
||||
trigger_error(
|
||||
'Composer detected issues in your platform: ' . implode(' ', $issues),
|
||||
E_USER_ERROR
|
||||
);
|
||||
}
|
||||
|
19
vendor/firebase/php-jwt/README.md
vendored
19
vendor/firebase/php-jwt/README.md
vendored
@ -27,6 +27,7 @@ Example
|
||||
-------
|
||||
```php
|
||||
use Firebase\JWT\JWT;
|
||||
use Firebase\JWT\Key;
|
||||
|
||||
$key = "example_key";
|
||||
$payload = array(
|
||||
@ -42,8 +43,8 @@ $payload = array(
|
||||
* https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40
|
||||
* for a list of spec-compliant algorithms.
|
||||
*/
|
||||
$jwt = JWT::encode($payload, $key);
|
||||
$decoded = JWT::decode($jwt, $key, array('HS256'));
|
||||
$jwt = JWT::encode($payload, $key, 'HS256');
|
||||
$decoded = JWT::decode($jwt, new Key($key, 'HS256'));
|
||||
|
||||
print_r($decoded);
|
||||
|
||||
@ -62,12 +63,13 @@ $decoded_array = (array) $decoded;
|
||||
* Source: http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#nbfDef
|
||||
*/
|
||||
JWT::$leeway = 60; // $leeway in seconds
|
||||
$decoded = JWT::decode($jwt, $key, array('HS256'));
|
||||
$decoded = JWT::decode($jwt, new Key($key, 'HS256'));
|
||||
```
|
||||
Example with RS256 (openssl)
|
||||
----------------------------
|
||||
```php
|
||||
use Firebase\JWT\JWT;
|
||||
use Firebase\JWT\Key;
|
||||
|
||||
$privateKey = <<<EOD
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
@ -106,7 +108,7 @@ $payload = array(
|
||||
$jwt = JWT::encode($payload, $privateKey, 'RS256');
|
||||
echo "Encode:\n" . print_r($jwt, true) . "\n";
|
||||
|
||||
$decoded = JWT::decode($jwt, $publicKey, array('RS256'));
|
||||
$decoded = JWT::decode($jwt, new Key($publicKey, 'RS256'));
|
||||
|
||||
/*
|
||||
NOTE: This will now be an object instead of an associative array. To get
|
||||
@ -121,6 +123,9 @@ Example with a passphrase
|
||||
-------------------------
|
||||
|
||||
```php
|
||||
use Firebase\JWT\JWT;
|
||||
use Firebase\JWT\Key;
|
||||
|
||||
// Your passphrase
|
||||
$passphrase = '[YOUR_PASSPHRASE]';
|
||||
|
||||
@ -147,7 +152,7 @@ echo "Encode:\n" . print_r($jwt, true) . "\n";
|
||||
// Get public key from the private key, or pull from from a file.
|
||||
$publicKey = openssl_pkey_get_details($privateKey)['key'];
|
||||
|
||||
$decoded = JWT::decode($jwt, $publicKey, array('RS256'));
|
||||
$decoded = JWT::decode($jwt, new Key($publicKey, 'RS256'));
|
||||
echo "Decode:\n" . print_r((array) $decoded, true) . "\n";
|
||||
```
|
||||
|
||||
@ -155,6 +160,7 @@ Example with EdDSA (libsodium and Ed25519 signature)
|
||||
----------------------------
|
||||
```php
|
||||
use Firebase\JWT\JWT;
|
||||
use Firebase\JWT\Key;
|
||||
|
||||
// Public and private keys are expected to be Base64 encoded. The last
|
||||
// non-empty line is used so that keys can be generated with
|
||||
@ -177,7 +183,7 @@ $payload = array(
|
||||
$jwt = JWT::encode($payload, $privateKey, 'EdDSA');
|
||||
echo "Encode:\n" . print_r($jwt, true) . "\n";
|
||||
|
||||
$decoded = JWT::decode($jwt, $publicKey, array('EdDSA'));
|
||||
$decoded = JWT::decode($jwt, new Key($publicKey, 'EdDSA'));
|
||||
echo "Decode:\n" . print_r((array) $decoded, true) . "\n";
|
||||
````
|
||||
|
||||
@ -194,6 +200,7 @@ $jwks = ['keys' => []];
|
||||
|
||||
// JWK::parseKeySet($jwks) returns an associative array of **kid** to private
|
||||
// key. Pass this as the second parameter to JWT::decode.
|
||||
// NOTE: The deprecated $supportedAlgorithm must be supplied when parsing from JWK.
|
||||
JWT::decode($payload, JWK::parseKeySet($jwks), $supportedAlgorithm);
|
||||
```
|
||||
|
||||
|
129
vendor/firebase/php-jwt/src/JWT.php
vendored
129
vendor/firebase/php-jwt/src/JWT.php
vendored
@ -2,9 +2,11 @@
|
||||
|
||||
namespace Firebase\JWT;
|
||||
|
||||
use ArrayAccess;
|
||||
use DomainException;
|
||||
use Exception;
|
||||
use InvalidArgumentException;
|
||||
use OpenSSLAsymmetricKey;
|
||||
use UnexpectedValueException;
|
||||
use DateTime;
|
||||
|
||||
@ -58,11 +60,13 @@ class JWT
|
||||
* Decodes a JWT string into a PHP object.
|
||||
*
|
||||
* @param string $jwt The JWT
|
||||
* @param string|array|resource $key The key, or map of keys.
|
||||
* @param Key|array<Key>|mixed $keyOrKeyArray The Key or array of Key objects.
|
||||
* If the algorithm used is asymmetric, this is the public key
|
||||
* @param array $allowed_algs List of supported verification algorithms
|
||||
* Each Key object contains an algorithm and matching key.
|
||||
* Supported algorithms are 'ES384','ES256', 'HS256', 'HS384',
|
||||
* 'HS512', 'RS256', 'RS384', and 'RS512'
|
||||
* @param array $allowed_algs [DEPRECATED] List of supported verification algorithms. Only
|
||||
* should be used for backwards compatibility.
|
||||
*
|
||||
* @return object The JWT's payload as a PHP object
|
||||
*
|
||||
@ -76,11 +80,11 @@ class JWT
|
||||
* @uses jsonDecode
|
||||
* @uses urlsafeB64Decode
|
||||
*/
|
||||
public static function decode($jwt, $key, array $allowed_algs = array())
|
||||
public static function decode($jwt, $keyOrKeyArray, array $allowed_algs = array())
|
||||
{
|
||||
$timestamp = \is_null(static::$timestamp) ? \time() : static::$timestamp;
|
||||
|
||||
if (empty($key)) {
|
||||
if (empty($keyOrKeyArray)) {
|
||||
throw new InvalidArgumentException('Key may not be empty');
|
||||
}
|
||||
$tks = \explode('.', $jwt);
|
||||
@ -103,27 +107,32 @@ class JWT
|
||||
if (empty(static::$supported_algs[$header->alg])) {
|
||||
throw new UnexpectedValueException('Algorithm not supported');
|
||||
}
|
||||
if (!\in_array($header->alg, $allowed_algs)) {
|
||||
throw new UnexpectedValueException('Algorithm not allowed');
|
||||
|
||||
list($keyMaterial, $algorithm) = self::getKeyMaterialAndAlgorithm(
|
||||
$keyOrKeyArray,
|
||||
empty($header->kid) ? null : $header->kid
|
||||
);
|
||||
|
||||
if (empty($algorithm)) {
|
||||
// Use deprecated "allowed_algs" to determine if the algorithm is supported.
|
||||
// This opens up the possibility of an attack in some implementations.
|
||||
// @see https://github.com/firebase/php-jwt/issues/351
|
||||
if (!\in_array($header->alg, $allowed_algs)) {
|
||||
throw new UnexpectedValueException('Algorithm not allowed');
|
||||
}
|
||||
} else {
|
||||
// Check the algorithm
|
||||
if (!self::constantTimeEquals($algorithm, $header->alg)) {
|
||||
// See issue #351
|
||||
throw new UnexpectedValueException('Incorrect key for this algorithm');
|
||||
}
|
||||
}
|
||||
if ($header->alg === 'ES256' || $header->alg === 'ES384') {
|
||||
// OpenSSL expects an ASN.1 DER sequence for ES256/ES384 signatures
|
||||
$sig = self::signatureToDER($sig);
|
||||
}
|
||||
|
||||
if (\is_array($key) || $key instanceof \ArrayAccess) {
|
||||
if (isset($header->kid)) {
|
||||
if (!isset($key[$header->kid])) {
|
||||
throw new UnexpectedValueException('"kid" invalid, unable to lookup correct key');
|
||||
}
|
||||
$key = $key[$header->kid];
|
||||
} else {
|
||||
throw new UnexpectedValueException('"kid" empty, unable to lookup correct key');
|
||||
}
|
||||
}
|
||||
|
||||
// Check the signature
|
||||
if (!static::verify("$headb64.$bodyb64", $sig, $key, $header->alg)) {
|
||||
if (!static::verify("$headb64.$bodyb64", $sig, $keyMaterial, $header->alg)) {
|
||||
throw new SignatureInvalidException('Signature verification failed');
|
||||
}
|
||||
|
||||
@ -285,18 +294,7 @@ class JWT
|
||||
case 'hash_hmac':
|
||||
default:
|
||||
$hash = \hash_hmac($algorithm, $msg, $key, true);
|
||||
if (\function_exists('hash_equals')) {
|
||||
return \hash_equals($signature, $hash);
|
||||
}
|
||||
$len = \min(static::safeStrlen($signature), static::safeStrlen($hash));
|
||||
|
||||
$status = 0;
|
||||
for ($i = 0; $i < $len; $i++) {
|
||||
$status |= (\ord($signature[$i]) ^ \ord($hash[$i]));
|
||||
}
|
||||
$status |= (static::safeStrlen($signature) ^ static::safeStrlen($hash));
|
||||
|
||||
return ($status === 0);
|
||||
return self::constantTimeEquals($signature, $hash);
|
||||
}
|
||||
}
|
||||
|
||||
@ -384,6 +382,75 @@ class JWT
|
||||
return \str_replace('=', '', \strtr(\base64_encode($input), '+/', '-_'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine if an algorithm has been provided for each Key
|
||||
*
|
||||
* @param Key|array<Key>|mixed $keyOrKeyArray
|
||||
* @param string|null $kid
|
||||
*
|
||||
* @throws UnexpectedValueException
|
||||
*
|
||||
* @return array containing the keyMaterial and algorithm
|
||||
*/
|
||||
private static function getKeyMaterialAndAlgorithm($keyOrKeyArray, $kid = null)
|
||||
{
|
||||
if (
|
||||
is_string($keyOrKeyArray)
|
||||
|| is_resource($keyOrKeyArray)
|
||||
|| $keyOrKeyArray instanceof OpenSSLAsymmetricKey
|
||||
) {
|
||||
return array($keyOrKeyArray, null);
|
||||
}
|
||||
|
||||
if ($keyOrKeyArray instanceof Key) {
|
||||
return array($keyOrKeyArray->getKeyMaterial(), $keyOrKeyArray->getAlgorithm());
|
||||
}
|
||||
|
||||
if (is_array($keyOrKeyArray) || $keyOrKeyArray instanceof ArrayAccess) {
|
||||
if (!isset($kid)) {
|
||||
throw new UnexpectedValueException('"kid" empty, unable to lookup correct key');
|
||||
}
|
||||
if (!isset($keyOrKeyArray[$kid])) {
|
||||
throw new UnexpectedValueException('"kid" invalid, unable to lookup correct key');
|
||||
}
|
||||
|
||||
$key = $keyOrKeyArray[$kid];
|
||||
|
||||
if ($key instanceof Key) {
|
||||
return array($key->getKeyMaterial(), $key->getAlgorithm());
|
||||
}
|
||||
|
||||
return array($key, null);
|
||||
}
|
||||
|
||||
throw new UnexpectedValueException(
|
||||
'$keyOrKeyArray must be a string|resource key, an array of string|resource keys, '
|
||||
. 'an instance of Firebase\JWT\Key key or an array of Firebase\JWT\Key keys'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $left
|
||||
* @param string $right
|
||||
* @return bool
|
||||
*/
|
||||
public static function constantTimeEquals($left, $right)
|
||||
{
|
||||
if (\function_exists('hash_equals')) {
|
||||
return \hash_equals($left, $right);
|
||||
}
|
||||
$len = \min(static::safeStrlen($left), static::safeStrlen($right));
|
||||
|
||||
$status = 0;
|
||||
for ($i = 0; $i < $len; $i++) {
|
||||
$status |= (\ord($left[$i]) ^ \ord($right[$i]));
|
||||
}
|
||||
$status |= (static::safeStrlen($left) ^ static::safeStrlen($right));
|
||||
|
||||
return ($status === 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to create a JSON error.
|
||||
*
|
||||
|
59
vendor/firebase/php-jwt/src/Key.php
vendored
Normal file
59
vendor/firebase/php-jwt/src/Key.php
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace Firebase\JWT;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use OpenSSLAsymmetricKey;
|
||||
|
||||
class Key
|
||||
{
|
||||
/** @var string $algorithm */
|
||||
private $algorithm;
|
||||
|
||||
/** @var string|resource|OpenSSLAsymmetricKey $keyMaterial */
|
||||
private $keyMaterial;
|
||||
|
||||
/**
|
||||
* @param string|resource|OpenSSLAsymmetricKey $keyMaterial
|
||||
* @param string $algorithm
|
||||
*/
|
||||
public function __construct($keyMaterial, $algorithm)
|
||||
{
|
||||
if (
|
||||
!is_string($keyMaterial)
|
||||
&& !is_resource($keyMaterial)
|
||||
&& !$keyMaterial instanceof OpenSSLAsymmetricKey
|
||||
) {
|
||||
throw new InvalidArgumentException('Type error: $keyMaterial must be a string, resource, or OpenSSLAsymmetricKey');
|
||||
}
|
||||
|
||||
if (empty($keyMaterial)) {
|
||||
throw new InvalidArgumentException('Type error: $keyMaterial must not be empty');
|
||||
}
|
||||
|
||||
if (!is_string($algorithm)|| empty($keyMaterial)) {
|
||||
throw new InvalidArgumentException('Type error: $algorithm must be a string');
|
||||
}
|
||||
|
||||
$this->keyMaterial = $keyMaterial;
|
||||
$this->algorithm = $algorithm;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the algorithm valid for this key
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAlgorithm()
|
||||
{
|
||||
return $this->algorithm;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|resource|OpenSSLAsymmetricKey
|
||||
*/
|
||||
public function getKeyMaterial()
|
||||
{
|
||||
return $this->keyMaterial;
|
||||
}
|
||||
}
|
@ -539,7 +539,7 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
||||
*/
|
||||
protected function detectSystemType($item)
|
||||
{
|
||||
return preg_match('/^[0-9]{2,4}-[0-9]{2}-[0-9]{2}/', $item) ? 'windows' : 'unix';
|
||||
return preg_match('/^[0-9]{2,4}-[0-9]{2}-[0-9]{2}/', trim($item)) ? 'windows' : 'unix';
|
||||
}
|
||||
|
||||
/**
|
||||
|
17
vendor/league/flysystem/src/Adapter/Ftp.php
vendored
17
vendor/league/flysystem/src/Adapter/Ftp.php
vendored
@ -11,6 +11,8 @@ use League\Flysystem\InvalidRootException;
|
||||
use League\Flysystem\Util;
|
||||
use League\Flysystem\Util\MimeType;
|
||||
|
||||
use function in_array;
|
||||
|
||||
class Ftp extends AbstractFtpAdapter
|
||||
{
|
||||
use StreamedCopyTrait;
|
||||
@ -235,7 +237,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
*/
|
||||
public function disconnect()
|
||||
{
|
||||
if (is_resource($this->connection)) {
|
||||
if ($this->hasFtpConnection()) {
|
||||
@ftp_close($this->connection);
|
||||
}
|
||||
|
||||
@ -536,8 +538,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
*/
|
||||
public function isConnected()
|
||||
{
|
||||
return is_resource($this->connection)
|
||||
&& $this->getRawExecResponseCode('NOOP') === 200;
|
||||
return $this->hasFtpConnection() && $this->getRawExecResponseCode('NOOP') === 200;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -563,11 +564,10 @@ class Ftp extends AbstractFtpAdapter
|
||||
$connection = $this->getConnection();
|
||||
|
||||
if ($this->isPureFtpd) {
|
||||
$path = str_replace(' ', '\ ', $path);
|
||||
$this->escapePath($path);
|
||||
$path = str_replace([' ', '[', ']'], ['\ ', '\\[', '\\]'], $path);
|
||||
}
|
||||
|
||||
return ftp_rawlist($connection, $options . ' ' . $path);
|
||||
return ftp_rawlist($connection, $options . ' ' . $this->escapePath($path));
|
||||
}
|
||||
|
||||
private function getRawExecResponseCode($command)
|
||||
@ -576,4 +576,9 @@ class Ftp extends AbstractFtpAdapter
|
||||
|
||||
return (int) preg_replace('/\D/', '', implode(' ', $response));
|
||||
}
|
||||
|
||||
private function hasFtpConnection(): bool
|
||||
{
|
||||
return is_resource($this->connection) || $this->connection instanceof \FTP\Connection;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## 1.8.0 - 2021-09-25
|
||||
## 1.9.0 - 2021-11-21
|
||||
|
||||
### Updated
|
||||
|
||||
- Updated lookup
|
||||
|
||||
- ## 1.8.0 - 2021-09-25
|
||||
|
||||
### Added
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
}
|
||||
],
|
||||
"scripts": {
|
||||
"test": "vendor/bin/phpunit",
|
||||
"phpstan": "vendor/bin/phpstan analyse -l 6 src"
|
||||
},
|
||||
"require": {
|
||||
@ -18,7 +19,7 @@
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.3",
|
||||
"phpstan/phpstan": "^0.12.68",
|
||||
"friendsofphp/php-cs-fixer": "^2.18"
|
||||
"friendsofphp/php-cs-fixer": "^3.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -37,6 +37,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
|
||||
'aep' => 'application/vnd.audiograph',
|
||||
'afm' => 'application/x-font-type1',
|
||||
'afp' => 'application/vnd.ibm.modcap',
|
||||
'age' => 'application/vnd.age',
|
||||
'ahead' => 'application/vnd.ahead.space',
|
||||
'ai' => 'application/pdf',
|
||||
'aif' => 'audio/x-aiff',
|
||||
@ -321,6 +322,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
|
||||
'gca' => 'application/x-gca-compressed',
|
||||
'gdl' => 'model/vnd.gdl',
|
||||
'gdoc' => 'application/vnd.google-apps.document',
|
||||
'ged' => 'text/vnd.familysearch.gedcom',
|
||||
'geo' => 'application/vnd.dynageo',
|
||||
'geojson' => 'application/geo+json',
|
||||
'gex' => 'application/vnd.geometry-explorer',
|
||||
|
2
vendor/phpmailer/phpmailer/VERSION
vendored
2
vendor/phpmailer/phpmailer/VERSION
vendored
@ -1 +1 @@
|
||||
6.5.1
|
||||
6.5.3
|
@ -9,24 +9,30 @@
|
||||
* @see http://unicode.org/udhr/n/notes_fra.html
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : échec de l\'authentification.';
|
||||
$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['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.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Encodage inconnu : ';
|
||||
$PHPMAILER_LANG['execute'] = 'Impossible de lancer l\'exécution : ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Impossible d\'accéder au fichier : ';
|
||||
$PHPMAILER_LANG['execute'] = 'Impossible de lancer l’exécution : ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extension manquante : ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Impossible d’accéder au fichier : ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Ouverture du fichier impossible : ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a échoué : ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'L\'adresse courriel n\'est pas valide : ';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'L\'entrée hôte n\'est pas valide : ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'L\'hôte n\'est pas valide : ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'L’adresse d’expéditeur suivante a échoué : ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Impossible d’instancier la fonction mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Adresse courriel non valide : ';
|
||||
$PHPMAILER_LANG['invalid_header'] = 'Nom ou valeur de l’en-tête non valide';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'Entrée d’hôte non valide : ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'Hôte non valide : ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : les destinataires suivants sont en erreur : ';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : les destinataires suivants ont échoué : ';
|
||||
$PHPMAILER_LANG['signing'] = 'Erreur de signature : ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Échec de la connexion SMTP.';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'Code SMTP : ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'Informations supplémentaires SMTP : ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'La fonction SMTP connect() a échouée.';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'Détails : ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP : ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Impossible d\'initialiser ou de réinitialiser une variable : ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Impossible d’initialiser ou de réinitialiser une variable : ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extension manquante : ';
|
||||
|
@ -7,24 +7,32 @@
|
||||
* @author Lucas Guimarães <lucas@lucasguimaraes.com>
|
||||
* @author Phelipe Alves <phelipealvesdesouza@gmail.com>
|
||||
* @author Fabio Beneditto <fabiobeneditto@gmail.com>
|
||||
* @author Geidson Benício Coelho <geidsonc@gmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.';
|
||||
$PHPMAILER_LANG['buggy_php'] = 'Sua versão do PHP é afetada por um bug que por resultar em messagens corrompidas. Para corrigir, mude para enviar usando SMTP, desative a opção mail.add_x_header em seu php.ini, mude para MacOS ou Linux, ou atualize seu PHP para versão 7.0.17+ ou 7.1.3+ ';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Mensagem vazia';
|
||||
$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extensão não existe: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: ';
|
||||
$PHPMAILER_LANG['invalid_header'] = 'Nome ou valor de cabeçalho inválido';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'hostentry inválido: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'host inválido: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Erro de Assinatura: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'Código do servidor SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'Informações adicionais do servidor SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'Detalhes do servidor SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extensão não existe: ';
|
||||
|
@ -3,25 +3,31 @@
|
||||
/**
|
||||
* Romanian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Alex Florea <alecz.fia@gmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.';
|
||||
$PHPMAILER_LANG['buggy_php'] = 'Versiunea instalată de PHP este afectată de o problemă care poate duce la coruperea mesajelor Pentru a preveni această problemă, folosiți SMTP, dezactivați opțiunea mail.add_x_header din php.ini, folosiți MacOS/Linux sau actualizați versiunea de PHP la 7.0.17+ sau 7.1.3+.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: ';
|
||||
$PHPMAILER_LANG['invalid_header'] = 'Numele sau valoarea header-ului nu este validă: ';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'Hostentry invalid: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'Host invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: ';
|
||||
$PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. ';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'Cod SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'Informații SMTP adiționale: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'Detalii SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: ';
|
||||
|
@ -9,23 +9,28 @@
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.';
|
||||
$PHPMAILER_LANG['buggy_php'] = 'Na vašo PHP različico vpliva napaka, ki lahko povzroči poškodovana sporočila. Če želite težavo odpraviti, preklopite na pošiljanje prek SMTP, onemogočite možnost mail.add_x_header v vaši php.ini datoteki, preklopite na MacOS ali Linux, ali nadgradite vašo PHP zaličico na 7.0.17+ ali 7.1.3+.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Vzpostavljanje povezave s SMTP gostiteljem ni uspelo.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: Strežnik zavrača podatke.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'E-poštno sporočilo nima vsebine.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Nepoznan tip kodiranja: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Operacija ni uspela: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razširitev: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Nimam dostopa do datoteke: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: ';
|
||||
$PHPMAILER_LANG['invalid_header'] = 'Neveljavno ime ali vrednost glave';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'Neveljaven vnos gostitelja: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'Neveljaven gostitelj: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Prosimo, vnesite vsaj enega naslovnika.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: ';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'SMTP koda: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'Dodatne informacije o SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'Podrobnosti: ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Napaka SMTP strežnika: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Ne morem nastaviti oz. ponastaviti spremenljivke: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razširitev: ';
|
||||
|
21
vendor/phpmailer/phpmailer/src/PHPMailer.php
vendored
21
vendor/phpmailer/phpmailer/src/PHPMailer.php
vendored
@ -750,7 +750,7 @@ class PHPMailer
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.5.1';
|
||||
const VERSION = '6.5.3';
|
||||
|
||||
/**
|
||||
* Error severity: message only, continue processing.
|
||||
@ -1451,7 +1451,12 @@ class PHPMailer
|
||||
$errorcode = 0;
|
||||
if (defined('INTL_IDNA_VARIANT_UTS46')) {
|
||||
//Use the current punycode standard (appeared in PHP 7.2)
|
||||
$punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_UTS46);
|
||||
$punycode = idn_to_ascii(
|
||||
$domain,
|
||||
\IDNA_DEFAULT | \IDNA_USE_STD3_RULES | \IDNA_CHECK_BIDI |
|
||||
\IDNA_CHECK_CONTEXTJ | \IDNA_NONTRANSITIONAL_TO_ASCII,
|
||||
\INTL_IDNA_VARIANT_UTS46
|
||||
);
|
||||
} elseif (defined('INTL_IDNA_VARIANT_2003')) {
|
||||
//Fall back to this old, deprecated/removed encoding
|
||||
$punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_2003);
|
||||
@ -1697,7 +1702,10 @@ class PHPMailer
|
||||
//Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html
|
||||
//Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
|
||||
//Example problem: https://www.drupal.org/node/1057954
|
||||
if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) {
|
||||
|
||||
//PHP 5.6 workaround
|
||||
$sendmail_from_value = ini_get('sendmail_from');
|
||||
if (empty($this->Sender) && !empty($sendmail_from_value)) {
|
||||
//PHP config has a sender address we can use
|
||||
$this->Sender = ini_get('sendmail_from');
|
||||
}
|
||||
@ -1879,7 +1887,10 @@ class PHPMailer
|
||||
//Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
|
||||
//Example problem: https://www.drupal.org/node/1057954
|
||||
//CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
|
||||
if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) {
|
||||
|
||||
//PHP 5.6 workaround
|
||||
$sendmail_from_value = ini_get('sendmail_from');
|
||||
if (empty($this->Sender) && !empty($sendmail_from_value)) {
|
||||
//PHP config has a sender address we can use
|
||||
$this->Sender = ini_get('sendmail_from');
|
||||
}
|
||||
@ -2196,7 +2207,7 @@ class PHPMailer
|
||||
* @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr")
|
||||
* Optionally, the language code can be enhanced with a 4-character
|
||||
* script annotation and/or a 2-character country annotation.
|
||||
* @param string $lang_path Path to the language file directory, with trailing separator (slash).D
|
||||
* @param string $lang_path Path to the language file directory, with trailing separator (slash)
|
||||
* Do not set this from user input!
|
||||
*
|
||||
* @return bool Returns true if the requested language was loaded, false otherwise.
|
||||
|
16
vendor/phpmailer/phpmailer/src/POP3.php
vendored
16
vendor/phpmailer/phpmailer/src/POP3.php
vendored
@ -46,7 +46,7 @@ class POP3
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.5.1';
|
||||
const VERSION = '6.5.3';
|
||||
|
||||
/**
|
||||
* Default POP3 port number.
|
||||
@ -308,6 +308,7 @@ class POP3
|
||||
{
|
||||
if (!$this->connected) {
|
||||
$this->setError('Not connected to POP3 server');
|
||||
return false;
|
||||
}
|
||||
if (empty($username)) {
|
||||
$username = $this->username;
|
||||
@ -337,6 +338,15 @@ class POP3
|
||||
public function disconnect()
|
||||
{
|
||||
$this->sendString('QUIT');
|
||||
|
||||
// RFC 1939 shows POP3 server sending a +OK response to the QUIT command.
|
||||
// Try to get it. Ignore any failures here.
|
||||
try {
|
||||
$this->getResponse();
|
||||
} catch (Exception $e) {
|
||||
//Do nothing
|
||||
}
|
||||
|
||||
//The QUIT command may cause the daemon to exit, which will kill our connection
|
||||
//So ignore errors here
|
||||
try {
|
||||
@ -344,6 +354,10 @@ class POP3
|
||||
} catch (Exception $e) {
|
||||
//Do nothing
|
||||
}
|
||||
|
||||
// Clean up attributes.
|
||||
$this->connected = false;
|
||||
$this->pop_conn = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
11
vendor/phpmailer/phpmailer/src/SMTP.php
vendored
11
vendor/phpmailer/phpmailer/src/SMTP.php
vendored
@ -35,7 +35,7 @@ class SMTP
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.5.1';
|
||||
const VERSION = '6.5.3';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
@ -392,7 +392,6 @@ class SMTP
|
||||
STREAM_CLIENT_CONNECT,
|
||||
$socket_context
|
||||
);
|
||||
restore_error_handler();
|
||||
} else {
|
||||
//Fall back to fsockopen which should work in more places, but is missing some features
|
||||
$this->edebug(
|
||||
@ -407,8 +406,8 @@ class SMTP
|
||||
$errstr,
|
||||
$timeout
|
||||
);
|
||||
restore_error_handler();
|
||||
}
|
||||
restore_error_handler();
|
||||
|
||||
//Verify we connected properly
|
||||
if (!is_resource($connection)) {
|
||||
@ -696,7 +695,7 @@ class SMTP
|
||||
/**
|
||||
* Send an SMTP DATA command.
|
||||
* Issues a data command and sends the msg_data to the server,
|
||||
* finializing the mail transaction. $msg_data is the message
|
||||
* finalizing the mail transaction. $msg_data is the message
|
||||
* that is to be send with the headers. Each header needs to be
|
||||
* on a single line followed by a <CRLF> with the message headers
|
||||
* and the message body being separated by an additional <CRLF>.
|
||||
@ -1170,7 +1169,7 @@ class SMTP
|
||||
if (!$this->server_caps) {
|
||||
$this->setError('No HELO/EHLO was sent');
|
||||
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!array_key_exists($name, $this->server_caps)) {
|
||||
@ -1182,7 +1181,7 @@ class SMTP
|
||||
}
|
||||
$this->setError('HELO handshake was used; No information about server extensions available');
|
||||
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->server_caps[$name];
|
||||
|
2
vendor/psr/container/composer.json
vendored
2
vendor/psr/container/composer.json
vendored
@ -12,7 +12,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.2.0"
|
||||
"php": ">=7.4.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -2,9 +2,11 @@
|
||||
|
||||
namespace Psr\Container;
|
||||
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Base interface representing a generic exception in a container.
|
||||
*/
|
||||
interface ContainerExceptionInterface
|
||||
interface ContainerExceptionInterface extends Throwable
|
||||
{
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ class DateCaster
|
||||
|
||||
public static function castInterval(\DateInterval $interval, array $a, Stub $stub, $isNested, $filter)
|
||||
{
|
||||
$now = new \DateTimeImmutable();
|
||||
$now = new \DateTimeImmutable('@0', new \DateTimeZone('UTC'));
|
||||
$numberOfSeconds = $now->add($interval)->getTimestamp() - $now->getTimestamp();
|
||||
$title = number_format($numberOfSeconds, 0, '.', ' ').'s';
|
||||
|
||||
@ -63,7 +63,8 @@ class DateCaster
|
||||
$format = '%R ';
|
||||
|
||||
if (0 === $i->y && 0 === $i->m && ($i->h >= 24 || $i->i >= 60 || $i->s >= 60)) {
|
||||
$i = date_diff($d = new \DateTime(), date_add(clone $d, $i)); // recalculate carry over points
|
||||
$d = new \DateTimeImmutable('@0', new \DateTimeZone('UTC'));
|
||||
$i = $d->diff($d->add($i)); // recalculate carry over points
|
||||
$format .= 0 < $i->days ? '%ad ' : '';
|
||||
} else {
|
||||
$format .= ($i->y ? '%yy ' : '').($i->m ? '%mm ' : '').($i->d ? '%dd ' : '');
|
||||
|
6
vendor/topthink/think-orm/src/Model.php
vendored
6
vendor/topthink/think-orm/src/Model.php
vendored
@ -613,7 +613,7 @@ abstract class Model implements JsonSerializable, ArrayAccess, Arrayable, Jsonab
|
||||
if ($this->autoWriteTimestamp && $this->updateTime) {
|
||||
// 自动写入更新时间
|
||||
$data[$this->updateTime] = $this->autoWriteTimestamp();
|
||||
$this->data[$this->updateTime] = $this->getTimestampValue($data[$this->updateTime]);
|
||||
$this->data[$this->updateTime] = $data[$this->updateTime];
|
||||
}
|
||||
|
||||
// 检查允许字段
|
||||
@ -678,12 +678,12 @@ abstract class Model implements JsonSerializable, ArrayAccess, Arrayable, Jsonab
|
||||
if ($this->autoWriteTimestamp) {
|
||||
if ($this->createTime && !isset($data[$this->createTime])) {
|
||||
$data[$this->createTime] = $this->autoWriteTimestamp();
|
||||
$this->data[$this->createTime] = $this->getTimestampValue($data[$this->createTime]);
|
||||
$this->data[$this->createTime] = $data[$this->createTime];
|
||||
}
|
||||
|
||||
if ($this->updateTime && !isset($data[$this->updateTime])) {
|
||||
$data[$this->updateTime] = $this->autoWriteTimestamp();
|
||||
$this->data[$this->updateTime] = $this->getTimestampValue($data[$this->updateTime]);
|
||||
$this->data[$this->updateTime] = $data[$this->updateTime];
|
||||
}
|
||||
}
|
||||
|
||||
|
29
vendor/topthink/think-orm/src/db/BaseQuery.php
vendored
29
vendor/topthink/think-orm/src/db/BaseQuery.php
vendored
@ -260,19 +260,26 @@ abstract class BaseQuery
|
||||
*/
|
||||
public function value(string $field, $default = null)
|
||||
{
|
||||
return $this->connection->value($this, $field, $default);
|
||||
$result = $this->connection->value($this, $field, $default);
|
||||
|
||||
$array[$field] = $result;
|
||||
$this->result($array);
|
||||
|
||||
return $array[$field];
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到某个列的数组
|
||||
* @access public
|
||||
* @param string|array $field 字段名 多个字段用逗号分隔
|
||||
* @param string $key 索引
|
||||
* @param string $key 索引
|
||||
* @return array
|
||||
*/
|
||||
public function column($field, string $key = ''): array
|
||||
{
|
||||
return $this->connection->column($this, $field, $key);
|
||||
$result = $this->connection->column($this, $field, $key);
|
||||
$this->resultSet($result, false);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -619,9 +626,17 @@ abstract class BaseQuery
|
||||
|
||||
unset($this->options['order'], $this->options['limit'], $this->options['page'], $this->options['field']);
|
||||
|
||||
$bind = $this->bind;
|
||||
$total = $this->count();
|
||||
$results = $total > 0 ? $this->options($options)->bind($bind)->page($page, $listRows)->select() : [];
|
||||
$bind = $this->bind;
|
||||
$total = $this->count();
|
||||
if ($total > 0) {
|
||||
$results = $this->options($options)->bind($bind)->page($page, $listRows)->select();
|
||||
} else {
|
||||
if (!empty($this->model)) {
|
||||
$results = new \think\model\Collection([]);
|
||||
} else {
|
||||
$results = new \think\Collection([]);
|
||||
}
|
||||
}
|
||||
} elseif ($simple) {
|
||||
$results = $this->limit(($page - 1) * $listRows, $listRows + 1)->select();
|
||||
$total = null;
|
||||
@ -741,7 +756,7 @@ abstract class BaseQuery
|
||||
|
||||
return [
|
||||
'data' => $result,
|
||||
'lastId' => $last[$key],
|
||||
'lastId' => $last ? $last[$key] : null,
|
||||
];
|
||||
}
|
||||
|
||||
|
2
vendor/topthink/think-orm/src/db/Builder.php
vendored
2
vendor/topthink/think-orm/src/db/Builder.php
vendored
@ -755,7 +755,7 @@ abstract class Builder
|
||||
} elseif ($value instanceof Raw) {
|
||||
$value = $this->parseRaw($query, $value);
|
||||
} else {
|
||||
$value = array_unique(is_array($value) ? $value : explode(',', $value));
|
||||
$value = array_unique(is_array($value) ? $value : explode(',', (string) $value));
|
||||
if (count($value) === 0) {
|
||||
return 'IN' == $exp ? '0 = 1' : '1 = 1';
|
||||
}
|
||||
|
@ -1442,7 +1442,7 @@ abstract class PDOConnection extends Connection
|
||||
|
||||
if (1 == $this->transTimes) {
|
||||
$this->linkID->beginTransaction();
|
||||
} elseif ($this->transTimes > 1 && $this->supportSavepoint()) {
|
||||
} elseif ($this->transTimes > 1 && $this->supportSavepoint() && $this->linkID->inTransaction()) {
|
||||
$this->linkID->exec(
|
||||
$this->parseSavepoint('trans' . $this->transTimes)
|
||||
);
|
||||
@ -1473,7 +1473,7 @@ abstract class PDOConnection extends Connection
|
||||
{
|
||||
$this->initConnect(true);
|
||||
|
||||
if (1 == $this->transTimes) {
|
||||
if (1 == $this->transTimes && $this->linkID->inTransaction()) {
|
||||
$this->linkID->commit();
|
||||
}
|
||||
|
||||
@ -1490,12 +1490,14 @@ abstract class PDOConnection extends Connection
|
||||
{
|
||||
$this->initConnect(true);
|
||||
|
||||
if (1 == $this->transTimes) {
|
||||
$this->linkID->rollBack();
|
||||
} elseif ($this->transTimes > 1 && $this->supportSavepoint()) {
|
||||
$this->linkID->exec(
|
||||
$this->parseSavepointRollBack('trans' . $this->transTimes)
|
||||
);
|
||||
if ($this->linkID->inTransaction()) {
|
||||
if (1 == $this->transTimes) {
|
||||
$this->linkID->rollBack();
|
||||
} elseif ($this->transTimes > 1 && $this->supportSavepoint()) {
|
||||
$this->linkID->exec(
|
||||
$this->parseSavepointRollBack('trans' . $this->transTimes)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->transTimes = max(0, $this->transTimes - 1);
|
||||
@ -1755,13 +1757,64 @@ abstract class PDOConnection extends Connection
|
||||
return $this->connect($dbConfig, $r, $r == $m ? false : $dbMaster);
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行数据库Xa事务
|
||||
* @access public
|
||||
* @param callable $callback 数据操作方法回调
|
||||
* @param array $dbs 多个查询对象或者连接对象
|
||||
* @return mixed
|
||||
* @throws PDOException
|
||||
* @throws \Exception
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function transactionXa(callable $callback, array $dbs = [])
|
||||
{
|
||||
$xid = uniqid('xa');
|
||||
|
||||
if (empty($dbs)) {
|
||||
$dbs[] = $this;
|
||||
}
|
||||
|
||||
foreach ($dbs as $key => $db) {
|
||||
if ($db instanceof BaseQuery) {
|
||||
$db = $db->getConnection();
|
||||
|
||||
$dbs[$key] = $db;
|
||||
}
|
||||
|
||||
$db->startTransXa($xid);
|
||||
}
|
||||
|
||||
try {
|
||||
$result = null;
|
||||
if (is_callable($callback)) {
|
||||
$result = $callback($this);
|
||||
}
|
||||
|
||||
foreach ($dbs as $db) {
|
||||
$db->prepareXa($xid);
|
||||
}
|
||||
|
||||
foreach ($dbs as $db) {
|
||||
$db->commitXa($xid);
|
||||
}
|
||||
|
||||
return $result;
|
||||
} catch (\Exception | \Throwable $e) {
|
||||
foreach ($dbs as $db) {
|
||||
$db->rollbackXa($xid);
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动XA事务
|
||||
* @access public
|
||||
* @param string $xid XA事务id
|
||||
* @return void
|
||||
*/
|
||||
public function startTransXa(string $xid)
|
||||
public function startTransXa(string $xid): void
|
||||
{}
|
||||
|
||||
/**
|
||||
@ -1770,7 +1823,7 @@ abstract class PDOConnection extends Connection
|
||||
* @param string $xid XA事务id
|
||||
* @return void
|
||||
*/
|
||||
public function prepareXa(string $xid)
|
||||
public function prepareXa(string $xid): void
|
||||
{}
|
||||
|
||||
/**
|
||||
@ -1779,7 +1832,7 @@ abstract class PDOConnection extends Connection
|
||||
* @param string $xid XA事务id
|
||||
* @return void
|
||||
*/
|
||||
public function commitXa(string $xid)
|
||||
public function commitXa(string $xid): void
|
||||
{}
|
||||
|
||||
/**
|
||||
@ -1788,6 +1841,6 @@ abstract class PDOConnection extends Connection
|
||||
* @param string $xid XA事务id
|
||||
* @return void
|
||||
*/
|
||||
public function rollbackXa(string $xid)
|
||||
public function rollbackXa(string $xid): void
|
||||
{}
|
||||
}
|
||||
|
@ -73,9 +73,10 @@ trait ResultOperation
|
||||
* 处理数据集
|
||||
* @access public
|
||||
* @param array $resultSet 数据集
|
||||
* @param bool $toCollection 是否转为对象
|
||||
* @return void
|
||||
*/
|
||||
protected function resultSet(array &$resultSet): void
|
||||
protected function resultSet(array &$resultSet, bool $toCollection = true): void
|
||||
{
|
||||
if (!empty($this->options['json'])) {
|
||||
foreach ($resultSet as &$result) {
|
||||
@ -96,7 +97,9 @@ trait ResultOperation
|
||||
}
|
||||
|
||||
// 返回Collection对象
|
||||
$resultSet = new Collection($resultSet);
|
||||
if ($toCollection) {
|
||||
$resultSet = new Collection($resultSet);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -182,7 +182,7 @@ trait TimeFieldQuery
|
||||
public function whereNotBetweenTime(string $field, $startTime, $endTime)
|
||||
{
|
||||
return $this->whereTime($field, '<', $startTime)
|
||||
->whereTime($field, '>', $endTime);
|
||||
->whereTime($field, '>', $endTime, 'OR');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,8 +12,6 @@ declare (strict_types = 1);
|
||||
|
||||
namespace think\db\concern;
|
||||
|
||||
use think\db\BaseQuery;
|
||||
|
||||
/**
|
||||
* 事务支持
|
||||
*/
|
||||
@ -30,45 +28,9 @@ trait Transaction
|
||||
* @throws \Exception
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function transactionXa($callback, array $dbs = [])
|
||||
public function transactionXa(callable $callback, array $dbs = [])
|
||||
{
|
||||
$xid = uniqid('xa');
|
||||
|
||||
if (empty($dbs)) {
|
||||
$dbs[] = $this->getConnection();
|
||||
}
|
||||
|
||||
foreach ($dbs as $key => $db) {
|
||||
if ($db instanceof BaseQuery) {
|
||||
$db = $db->getConnection();
|
||||
|
||||
$dbs[$key] = $db;
|
||||
}
|
||||
|
||||
$db->startTransXa($xid);
|
||||
}
|
||||
|
||||
try {
|
||||
$result = null;
|
||||
if (is_callable($callback)) {
|
||||
$result = call_user_func_array($callback, [$this]);
|
||||
}
|
||||
|
||||
foreach ($dbs as $db) {
|
||||
$db->prepareXa($xid);
|
||||
}
|
||||
|
||||
foreach ($dbs as $db) {
|
||||
$db->commitXa($xid);
|
||||
}
|
||||
|
||||
return $result;
|
||||
} catch (\Exception | \Throwable $e) {
|
||||
foreach ($dbs as $db) {
|
||||
$db->rollbackXa($xid);
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
return $this->connection->transactionXa($callback, $dbs);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -114,4 +76,47 @@ trait Transaction
|
||||
$this->connection->rollback();
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动XA事务
|
||||
* @access public
|
||||
* @param string $xid XA事务id
|
||||
* @return void
|
||||
*/
|
||||
public function startTransXa(string $xid): void
|
||||
{
|
||||
$this->connection->startTransXa($xid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 预编译XA事务
|
||||
* @access public
|
||||
* @param string $xid XA事务id
|
||||
* @return void
|
||||
*/
|
||||
public function prepareXa(string $xid): void
|
||||
{
|
||||
$this->connection->prepareXa($xid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交XA事务
|
||||
* @access public
|
||||
* @param string $xid XA事务id
|
||||
* @return void
|
||||
*/
|
||||
public function commitXa(string $xid): void
|
||||
{
|
||||
$this->connection->commitXa($xid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 回滚XA事务
|
||||
* @access public
|
||||
* @param string $xid XA事务id
|
||||
* @return void
|
||||
*/
|
||||
public function rollbackXa(string $xid): void
|
||||
{
|
||||
$this->connection->rollbackXa($xid);
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ trait WhereQuery
|
||||
*/
|
||||
protected function parseQueryWhere(BaseQuery $query): void
|
||||
{
|
||||
$this->options['where'] = $query->getOptions('where');
|
||||
$this->options['where'] = $query->getOptions('where') ?? [];
|
||||
|
||||
if ($query->getOptions('via')) {
|
||||
$via = $query->getOptions('via');
|
||||
|
@ -27,10 +27,9 @@ use MongoDB\Driver\WriteConcern;
|
||||
use think\db\BaseQuery;
|
||||
use think\db\builder\Mongo as Builder;
|
||||
use think\db\Connection;
|
||||
use think\db\exception\DbEventException;
|
||||
use think\db\exception\DbException as Exception;
|
||||
use think\db\Mongo as Query;
|
||||
use function implode;
|
||||
use function is_array;
|
||||
|
||||
/**
|
||||
* Mongo数据库驱动
|
||||
@ -878,15 +877,15 @@ class Mongo extends Connection
|
||||
*/
|
||||
public function select(BaseQuery $query): array
|
||||
{
|
||||
$resultSet = $this->db->trigger('before_select', $query);
|
||||
|
||||
if (!$resultSet) {
|
||||
$resultSet = $this->mongoQuery($query, function ($query) {
|
||||
return $this->builder->select($query);
|
||||
});
|
||||
try {
|
||||
$this->db->trigger('before_select', $query);
|
||||
} catch (DbEventException $e) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return $resultSet;
|
||||
return $this->mongoQuery($query, function ($query) {
|
||||
return $this->builder->select($query);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -904,18 +903,18 @@ class Mongo extends Connection
|
||||
public function find(BaseQuery $query): array
|
||||
{
|
||||
// 事件回调
|
||||
$result = $this->db->trigger('before_find', $query);
|
||||
|
||||
if (!$result) {
|
||||
// 执行查询
|
||||
$resultSet = $this->mongoQuery($query, function ($query) {
|
||||
return $this->builder->select($query, true);
|
||||
});
|
||||
|
||||
$result = $resultSet[0] ?? [];
|
||||
try {
|
||||
$this->db->trigger('before_find', $query);
|
||||
} catch (DbEventException $e) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return $result;
|
||||
// 执行查询
|
||||
$resultSet = $this->mongoQuery($query, function ($query) {
|
||||
return $this->builder->select($query, true);
|
||||
});
|
||||
|
||||
return $resultSet[0] ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -117,7 +117,7 @@ class Mysql extends PDOConnection
|
||||
* @param string $xid XA事务id
|
||||
* @return void
|
||||
*/
|
||||
public function startTransXa(string $xid)
|
||||
public function startTransXa(string $xid): void
|
||||
{
|
||||
$this->initConnect(true);
|
||||
$this->linkID->exec("XA START '$xid'");
|
||||
@ -129,7 +129,7 @@ class Mysql extends PDOConnection
|
||||
* @param string $xid XA事务id
|
||||
* @return void
|
||||
*/
|
||||
public function prepareXa(string $xid)
|
||||
public function prepareXa(string $xid): void
|
||||
{
|
||||
$this->initConnect(true);
|
||||
$this->linkID->exec("XA END '$xid'");
|
||||
@ -142,7 +142,7 @@ class Mysql extends PDOConnection
|
||||
* @param string $xid XA事务id
|
||||
* @return void
|
||||
*/
|
||||
public function commitXa(string $xid)
|
||||
public function commitXa(string $xid): void
|
||||
{
|
||||
$this->initConnect(true);
|
||||
$this->linkID->exec("XA COMMIT '$xid'");
|
||||
@ -154,7 +154,7 @@ class Mysql extends PDOConnection
|
||||
* @param string $xid XA事务id
|
||||
* @return void
|
||||
*/
|
||||
public function rollbackXa(string $xid)
|
||||
public function rollbackXa(string $xid): void
|
||||
{
|
||||
$this->initConnect(true);
|
||||
$this->linkID->exec("XA ROLLBACK '$xid'");
|
||||
|
62
vendor/topthink/think-orm/src/model/Relation.php
vendored
62
vendor/topthink/think-orm/src/model/Relation.php
vendored
@ -85,6 +85,12 @@ abstract class Relation
|
||||
*/
|
||||
protected $withoutField;
|
||||
|
||||
/**
|
||||
* 默认数据
|
||||
* @var mixed
|
||||
*/
|
||||
protected $default;
|
||||
|
||||
/**
|
||||
* 获取关联的所属模型
|
||||
* @access public
|
||||
@ -194,30 +200,6 @@ abstract class Relation
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
* @access public
|
||||
* @param array $data 更新数据
|
||||
* @return integer
|
||||
*/
|
||||
public function update(array $data = []): int
|
||||
{
|
||||
return $this->query->update($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
* @access public
|
||||
* @param mixed $data 表达式 true 表示强制删除
|
||||
* @return int
|
||||
* @throws Exception
|
||||
* @throws PDOException
|
||||
*/
|
||||
public function delete($data = null): int
|
||||
{
|
||||
return $this->query->delete($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 限制关联数据的数量
|
||||
* @access public
|
||||
@ -258,6 +240,38 @@ abstract class Relation
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置关联数据不存在的时候默认值
|
||||
* @access public
|
||||
* @param mixed $data 默认值
|
||||
* @return $this
|
||||
*/
|
||||
public function withDefault($data = null)
|
||||
{
|
||||
$this->default = $data;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取关联数据默认值
|
||||
* @access protected
|
||||
* @return mixed
|
||||
*/
|
||||
protected function getDefaultModel()
|
||||
{
|
||||
if (is_array($this->default)) {
|
||||
$model = (new $this->model)->data($this->default);
|
||||
} elseif ($this->default instanceof Closure) {
|
||||
$closure = $this->default;
|
||||
$model = new $this->model;
|
||||
$closure($model);
|
||||
} else {
|
||||
$model = $this->default;
|
||||
}
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断闭包的参数类型
|
||||
* @access protected
|
||||
|
@ -73,6 +73,8 @@ class BelongsTo extends OneToOne
|
||||
}
|
||||
|
||||
$relationModel->setParent(clone $this->parent);
|
||||
} else {
|
||||
$relationModel = $this->getDefaultModel();
|
||||
}
|
||||
|
||||
return $relationModel;
|
||||
@ -182,9 +184,10 @@ class BelongsTo extends OneToOne
|
||||
|
||||
$fields = $this->getRelationQueryFields($fields, $model);
|
||||
$softDelete = $this->query->getOptions('soft_delete');
|
||||
$query = $query ?: $this->parent->db()->alias($model);
|
||||
$query = $query ?: $this->parent->db();
|
||||
|
||||
return $query->field($fields)
|
||||
return $query->alias($model)
|
||||
->field($fields)
|
||||
->join([$table => $relation], $model . '.' . $this->foreignKey . '=' . $relation . '.' . $this->localKey, $joinType ?: $this->joinType)
|
||||
->when($softDelete, function ($query) use ($softDelete, $relation) {
|
||||
$query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null);
|
||||
@ -226,7 +229,7 @@ class BelongsTo extends OneToOne
|
||||
foreach ($resultSet as $result) {
|
||||
// 关联模型
|
||||
if (!isset($data[$result->$foreignKey])) {
|
||||
$relationModel = null;
|
||||
$relationModel = $this->getDefaultModel();
|
||||
} else {
|
||||
$relationModel = $data[$result->$foreignKey];
|
||||
$relationModel->setParent(clone $result);
|
||||
@ -267,7 +270,7 @@ class BelongsTo extends OneToOne
|
||||
|
||||
// 关联模型
|
||||
if (!isset($data[$result->$foreignKey])) {
|
||||
$relationModel = null;
|
||||
$relationModel = $this->getDefaultModel();
|
||||
} else {
|
||||
$relationModel = $data[$result->$foreignKey];
|
||||
$relationModel->setParent(clone $result);
|
||||
|
@ -340,9 +340,10 @@ class HasMany extends Relation
|
||||
|
||||
$fields = $this->getRelationQueryFields($fields, $model);
|
||||
$softDelete = $this->query->getOptions('soft_delete');
|
||||
$query = $query ?: $this->parent->db()->alias($model);
|
||||
$query = $query ?: $this->parent->db();
|
||||
|
||||
return $query->group($model . '.' . $this->localKey)
|
||||
return $query->alias($model)
|
||||
->group($model . '.' . $this->localKey)
|
||||
->field($fields)
|
||||
->join([$table => $relation], $model . '.' . $this->localKey . '=' . $relation . '.' . $this->foreignKey, $joinType)
|
||||
->when($softDelete, function ($query) use ($softDelete, $relation) {
|
||||
|
@ -151,9 +151,10 @@ class HasManyThrough extends Relation
|
||||
|
||||
$fields = $this->getRelationQueryFields($fields, $model);
|
||||
$softDelete = $this->query->getOptions('soft_delete');
|
||||
$query = $query ?: $this->parent->db()->alias($model);
|
||||
$query = $query ?: $this->parent->db();
|
||||
|
||||
return $query->join($throughTable, $throughTable . '.' . $this->foreignKey . '=' . $model . '.' . $this->localKey)
|
||||
return $query->alias($model)
|
||||
->join($throughTable, $throughTable . '.' . $this->foreignKey . '=' . $model . '.' . $this->localKey)
|
||||
->join($modelTable, $modelTable . '.' . $throughKey . '=' . $throughTable . '.' . $this->throughPk, $joinType)
|
||||
->when($softDelete, function ($query) use ($softDelete, $modelTable) {
|
||||
$query->where($modelTable . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null);
|
||||
|
@ -72,6 +72,8 @@ class HasOne extends OneToOne
|
||||
}
|
||||
|
||||
$relationModel->setParent(clone $this->parent);
|
||||
} else {
|
||||
$relationModel = $this->getDefaultModel();
|
||||
}
|
||||
|
||||
return $relationModel;
|
||||
@ -181,9 +183,10 @@ class HasOne extends OneToOne
|
||||
|
||||
$fields = $this->getRelationQueryFields($fields, $model);
|
||||
$softDelete = $this->query->getOptions('soft_delete');
|
||||
$query = $query ? $query->alias($model) : $this->parent->db()->alias($model);
|
||||
$query = $query ?: $this->parent->db();
|
||||
|
||||
return $query->field($fields)
|
||||
return $query->alias($model)
|
||||
->field($fields)
|
||||
->join([$table => $relation], $model . '.' . $this->localKey . '=' . $relation . '.' . $this->foreignKey, $joinType ?: $this->joinType)
|
||||
->when($softDelete, function ($query) use ($softDelete, $relation) {
|
||||
$query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null);
|
||||
@ -225,7 +228,7 @@ class HasOne extends OneToOne
|
||||
foreach ($resultSet as $result) {
|
||||
// 关联模型
|
||||
if (!isset($data[$result->$localKey])) {
|
||||
$relationModel = null;
|
||||
$relationModel = $this->getDefaultModel();
|
||||
} else {
|
||||
$relationModel = $data[$result->$localKey];
|
||||
$relationModel->setParent(clone $result);
|
||||
@ -266,7 +269,7 @@ class HasOne extends OneToOne
|
||||
|
||||
// 关联模型
|
||||
if (!isset($data[$result->$localKey])) {
|
||||
$relationModel = null;
|
||||
$relationModel = $this->getDefaultModel();
|
||||
} else {
|
||||
$relationModel = $data[$result->$localKey];
|
||||
$relationModel->setParent(clone $result);
|
||||
|
@ -40,6 +40,8 @@ class HasOneThrough extends HasManyThrough
|
||||
|
||||
if ($relationModel) {
|
||||
$relationModel->setParent(clone $this->parent);
|
||||
} else {
|
||||
$relationModel = $this->getDefaultModel();
|
||||
}
|
||||
|
||||
return $relationModel;
|
||||
@ -79,7 +81,7 @@ class HasOneThrough extends HasManyThrough
|
||||
foreach ($resultSet as $result) {
|
||||
// 关联模型
|
||||
if (!isset($data[$result->$localKey])) {
|
||||
$relationModel = null;
|
||||
$relationModel = $this->getDefaultModel();
|
||||
} else {
|
||||
$relationModel = $data[$result->$localKey];
|
||||
$relationModel->setParent(clone $result);
|
||||
@ -115,7 +117,7 @@ class HasOneThrough extends HasManyThrough
|
||||
|
||||
// 关联模型
|
||||
if (!isset($data[$result->$localKey])) {
|
||||
$relationModel = null;
|
||||
$relationModel = $this->getDefaultModel();
|
||||
} else {
|
||||
$relationModel = $data[$result->$localKey];
|
||||
$relationModel->setParent(clone $result);
|
||||
|
@ -90,6 +90,8 @@ class MorphOne extends Relation
|
||||
}
|
||||
|
||||
$relationModel->setParent(clone $this->parent);
|
||||
} else {
|
||||
$relationModel = $this->getDefaultModel();
|
||||
}
|
||||
|
||||
return $relationModel;
|
||||
@ -158,7 +160,7 @@ class MorphOne extends Relation
|
||||
// 关联数据封装
|
||||
foreach ($resultSet as $result) {
|
||||
if (!isset($data[$result->$pk])) {
|
||||
$relationModel = null;
|
||||
$relationModel = $this->getDefaultModel();
|
||||
} else {
|
||||
$relationModel = $data[$result->$pk];
|
||||
$relationModel->setParent(clone $result);
|
||||
@ -202,7 +204,7 @@ class MorphOne extends Relation
|
||||
$relationModel->setParent(clone $result);
|
||||
$relationModel->exists(true);
|
||||
} else {
|
||||
$relationModel = null;
|
||||
$relationModel = $this->getDefaultModel();
|
||||
}
|
||||
|
||||
if (!empty($this->bindAttr)) {
|
||||
|
@ -7,7 +7,7 @@
|
||||
{block name="content"}
|
||||
<div class="layui-container">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md8">
|
||||
<div class="layui-col-md9">
|
||||
<div class="fly-panel" style="margin-bottom: 0;">
|
||||
<div class="layui-tab-card">
|
||||
<ul class="layui-tab-title">
|
||||
@ -53,7 +53,7 @@
|
||||
<div style="text-align: center" id="pages"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="layui-col-md3">
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center;">
|
||||
{volist name="ad_cateImg" id="vo"}
|
||||
|
@ -8,7 +8,7 @@
|
||||
{block name="content"}
|
||||
<div class="layui-container">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md8 content detail">
|
||||
<div class="layui-col-md9 content detail">
|
||||
<div class="fly-panel detail-box">
|
||||
{//标题}
|
||||
<div class="title layui-clear">
|
||||
@ -128,7 +128,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="layui-col-md3">
|
||||
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-main wenda-user">
|
||||
|
@ -7,7 +7,7 @@
|
||||
{block name="content"}
|
||||
<div class="layui-container">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md8">
|
||||
<div class="layui-col-md9">
|
||||
<div class="fly-panel" style="margin-bottom: 0;">
|
||||
|
||||
{include file="public/filter" /}
|
||||
@ -54,7 +54,7 @@
|
||||
<div style="text-align: center" id="pages"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="layui-col-md3">
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center;">
|
||||
{volist name="ad_cateImg" id="vo"}
|
||||
|
@ -8,7 +8,7 @@
|
||||
{block name="content"}
|
||||
<div class="layui-container">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md8 content detail">
|
||||
<div class="layui-col-md9 content detail">
|
||||
<div class="fly-panel detail-box">
|
||||
{//标题}
|
||||
<h1 style="color:{$article.title_color};">{$article.title}
|
||||
@ -140,7 +140,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="layui-col-md3">
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title">{:lang('sponsor')}<span style="padding: 0 3px;">-</span>
|
||||
<a href="" class="fly-link fly-joinad">{:lang('i want to join')}</a>
|
||||
|
@ -1,325 +0,0 @@
|
||||
{extend name="public/base" /}
|
||||
|
||||
{block name="title"}{$article.title}-{$sysInfo.webname}{/block}
|
||||
{block name="keywords"}{$article.title},{$article.tags}{/block}
|
||||
{block name="description"}{$article.title},{:getArtContent($article.content)}{/block}
|
||||
{block name="link"}<link rel="stylesheet" href="/static/res/css/plyr.css" charset="utf-8">{/block}
|
||||
{block name="column"}<div class="layui-hide-xs">{include file="/public/column" /}</div>{/block}
|
||||
{block name="content"}
|
||||
<div class="layui-container">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md8 content detail">
|
||||
<div class="fly-panel detail-box">
|
||||
{//标题}
|
||||
<h1 style="color:{$article.title_color};">{$article.title}
|
||||
<span class="layui-hide-xs"><div onclick="PhoneDown();" style="" class="detail_qrcode" id="mobile"></div></span>
|
||||
</h1>
|
||||
{//图标}
|
||||
<div class="fly-detail-info">
|
||||
<span class="layui-badge layui-bg-green fly-detail-column">{:cookie('think_lang') == 'en-us' ? $article.cate.ename : $article.cate.catename}</span>
|
||||
{if ($article.jie == 0)}
|
||||
<span class="layui-badge" style="background-color: #999;">{:lang('no finished')}</span>
|
||||
{else /}
|
||||
<span class="layui-badge" style="background-color: #5FB878;">{:lang('finished')}</span>
|
||||
{/if}
|
||||
{if ($article.is_top == 1)}<span class="layui-badge layui-bg-black">{:lang('top')}</span>{/if}
|
||||
{if ($article.is_hot == 1)}<span class="layui-badge layui-bg-red">{:lang('hot')}</span>{/if}
|
||||
|
||||
<span id="LAY_jieAdmin" data-id="{$article['id']}"></span>
|
||||
|
||||
<span class="fly-list-nums">
|
||||
<a href="#comment"><i class="iconfont" title="{:lang('reply')}"></i>{$comments->count()}</a><i class="iconfont" title="浏览"></i>{$pv}
|
||||
</span>
|
||||
</div>
|
||||
{//作者}
|
||||
<div class="detail-about">
|
||||
<a class="fly-avatar" href="{:url('user/home',['id'=>$article.user.id])}">
|
||||
<img src="{$article.user.user_img}" alt="{$article.user.name}">
|
||||
<i class="iconfont icon-renzheng" title="认证信息"></i>
|
||||
</a>
|
||||
<div class="fly-detail-user">
|
||||
<a href="{:url('user/home',['id'=>$article.user.id])}" class="fly-link">
|
||||
{if config('taoler.config.area_show') == 1}<i class="layui-badge layui-bg-green " title="">{:getAsing($article.user.area_id) ?: '无'}</i>{/if}
|
||||
<cite>{$article.user.nickname ?: $article.user.name}</cite>
|
||||
</a>
|
||||
<span class="layui-btn layui-btn-xs guanzhu" >关注</span>
|
||||
</div>
|
||||
<div class="detail-hits">
|
||||
<!--span style="padding-right: 10px; color: #FF7200">悬赏:60飞吻</span-->
|
||||
<span class="post-time" data="{$article.create_time}" style="padding-top: 5px;"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="detail-body photos">{$article.content|raw}</div>
|
||||
{//管理}
|
||||
{if (($article.upzip !== '') || session('?user_name'))}
|
||||
<div class="detail-assist">
|
||||
{notempty name="$article.upzip"}
|
||||
<button type="button" class="layui-btn layui-btn-xs" id="zip-download"><i class="layui-icon layui-icon-download-circle"></i>{:lang('download files')}: {$article.downloads}次</button>
|
||||
{/notempty}
|
||||
<div class="fly-admin-box" data-id="{$article.id}">
|
||||
{if ($user.auth ?? '')}
|
||||
<span class="layui-btn layui-btn-xs jie-admin" type="del"><i class="layui-icon layui-icon-delete"></i></span>
|
||||
{if($article.is_top == 0)}<span class="layui-btn layui-btn-xs jie-admin" type="set" field="top" rank="1"><i class="layui-icon layui-icon-top"></i></span>
|
||||
{else /}<span class="layui-btn layui-btn-xs jie-admin" type="set" field="top" rank="0" style="background-color:#ccc;">{:lang('cancel topping')}</span>{/if}
|
||||
{if($article.is_hot == 0)}
|
||||
<span class="layui-btn layui-btn-xs jie-admin" type="set" field="hot" rank="1"><i class="layui-icon layui-icon-fire"></i></span>
|
||||
{else /}
|
||||
<span class="layui-btn layui-btn-xs jie-admin" type="set" field="hot" rank="0" style="background-color:#ccc;">{:lang('cancel hoting')}</span>
|
||||
{/if}
|
||||
{if($article.is_reply == 1)}
|
||||
<span class="layui-btn layui-btn-xs jie-admin" type="set" field="reply" rank="0"><i class="layui-icon layui-icon-face-cry"></i></span>
|
||||
{else /}
|
||||
<span class="layui-btn layui-btn-xs jie-admin" type="set" field="reply" rank="1" style="background-color:#ccc;">{:lang('enable reply')}</span>
|
||||
{/if}
|
||||
<span id="color">{:lang('title color')}</span>
|
||||
{/if}
|
||||
{if(session('user_name')==$article.user.name || ($user.auth ?? ''))}
|
||||
<span class="layui-btn layui-btn-xs jie-admin" type="edit"><a href="{:url('article/edit',['id'=>$article.id])}">{:lang('edit')}</a></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{//评论}
|
||||
<div class="fly-panel detail-box" id="flyReply">
|
||||
<span style="font-size:18px;">评论 {$comments->count()}</span>
|
||||
<ul class="jieda" id="jieda">
|
||||
{volist name="comments" id="vo" empty= ""}
|
||||
<li data-id="{$vo.id}" class="jieda-daan">
|
||||
<a name="item-1111111111"></a>
|
||||
<div class="detail-about detail-about-reply">
|
||||
<a class="fly-avatar" href="{:url('user/home',['id'=>$vo.user.id])}">
|
||||
<img src="{$vo.user.user_img}" alt=" "><i class="iconfont icon-renzheng" title="认证信息"></i>
|
||||
</a>
|
||||
<div class="fly-detail-user">
|
||||
<a href="{:url('user/home',['id'=>$vo.user.id])}" class="fly-link">
|
||||
{if config('taoler.config.area_show') == 1}<i class="layui-badge layui-bg-green " title="">{:getAsing($vo.user.area_id) ?: '无'}</i>{/if}
|
||||
<cite>{$vo.user.nickname ?: $vo.user.name}</cite>
|
||||
</a>
|
||||
{if condition="$article.user.id eq $vo.user.id"}<span>({:lang('poster')})</span>{/if}
|
||||
</div>
|
||||
<div class="detail-hits"><span class="post-time" data="{$vo.create_time}"></span></div>
|
||||
{if $vo.cai == 1}<i class="iconfont icon-caina" title="最佳答案"></i>{/if}
|
||||
</div>
|
||||
<div class="detail-body jieda-body photos">{$vo.content|raw}</div>
|
||||
<div class="jieda-reply">
|
||||
<span class="jieda-zan {if($vo.zan != 0)}zanok{/if}" type="zan">
|
||||
<i class="iconfont icon-zan"></i><em>{$vo.zan}</em>
|
||||
</span>
|
||||
<span type="reply"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
||||
{//评论编辑删除采纳权限}
|
||||
<div class="jieda-admin">
|
||||
{if ((session('user_id') == $vo.user.id) && (getLimtTime($vo.create_time) < 2)) OR ($user.auth ?? '')}
|
||||
<span type="edit">{:lang('edit')}</span>
|
||||
<span type="del">{:lang('delete')}</span>
|
||||
{/if}
|
||||
{if ($vo.cai == 0) && ((session('user_id') == $article.user_id) OR ($user.auth ?? '')) /}<span class="jieda-accept" type="accept">{:lang('accept')}</span>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<div style="text-align: center">{$comments|raw}</div>
|
||||
{if condition="$article.is_reply == 1"}
|
||||
<div class="layui-form layui-form-pane">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<a name="comment"></a>
|
||||
<div class="layui-input-block">
|
||||
<textarea id="L_content" name="content" required lay-verify="required" placeholder="{:lang('please input the content')}" class="layui-textarea fly-editor" style="height: 150px;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input type="hidden" name="article_id" value="{$article.id}">
|
||||
<input type="hidden" name="user_id" value="{:session('user_id')}">
|
||||
<button class="layui-btn" lay-filter="user-comment" lay-submit>{:lang('submit comments')}</button>
|
||||
</div>
|
||||
</div>
|
||||
{else /}
|
||||
<blockquote class="layui-elem-quote layui-quote-nm layui-disabled" style="margin: 100px 0 20px; padding: 50px 20px; text-align: center; color: #999!important;">本帖已设置禁止回复</blockquote>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title">{:lang('sponsor')}<span style="padding: 0 3px;">-</span>
|
||||
<a href="" class="fly-link fly-joinad">{:lang('i want to join')}</a>
|
||||
</div>
|
||||
<div class="fly-panel-main">
|
||||
{volist name="ad_comm" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: {$vo.slid_color};">{$vo.slid_name}</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
<dl class="fly-panel fly-list-one">
|
||||
<dt class="fly-panel-title">{:lang('hot post list')}</dt>
|
||||
{volist name="artHot" id="vo"}
|
||||
<dd>
|
||||
<a href="{:url('article/detail',['id' => $vo.id])}">{$vo.title}</a>
|
||||
<span><i class="iconfont icon-pinglun1"></i> {$vo.comments_count}</span>
|
||||
</dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center;">
|
||||
{volist name="ad_art" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$vo.slid_img}" style="max-width: 100%;"></a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--底部栏-->
|
||||
<div class="site-tree-mobile-detail-bottom layui-hide-md">
|
||||
<div id="LAY_jieAdmin1" data-id="{$article['id']}"></div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="public/menu" /}
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
var collectionFind = "{:url('Collection/find')}",
|
||||
articleJieset = "{:url('Article/jieset')}",
|
||||
articleDelete = "{:url('Article/delete')}",
|
||||
commentJiedaZan = "{:url('Comment/jiedaZan')}",
|
||||
commentJiedaCai = "{:url('Comment/jiedaCai')}",
|
||||
commentGetDa = "{:url('Comment/getDa')}",
|
||||
commentUpdateDa = "{:url('Comment/updateDa')}",
|
||||
commentJiedaDelete = "{:url('Comment/jiedaDelete')}",
|
||||
langCollection = "{:lang('collection')}",
|
||||
langCancelCollection = "{:lang('cancel collection')}";
|
||||
var collection = "{:url('collection/')}";
|
||||
|
||||
layui.use(['fly', 'face','colorpicker','plyr'], function(){
|
||||
var $ = layui.jquery
|
||||
,form = layui.form
|
||||
,fly = layui.fly
|
||||
,colorpicker = layui.colorpicker
|
||||
,plyr = layui.plyr;
|
||||
var laytpl = layui.laytpl;
|
||||
var uid = layui.cache.user.uid;
|
||||
|
||||
//tpl模板给发布时间赋值
|
||||
$('div.detail-hits').children('span.post-time').each(function(){
|
||||
var othis = $(this), html = othis.html();
|
||||
var string = laytpl('{{ d.time }}').render({
|
||||
//time: html
|
||||
time: othis.attr('data')
|
||||
});
|
||||
var posttime = layui.util.timeAgo(string, 1);
|
||||
|
||||
othis.text(posttime);
|
||||
//console.log(othis.attr('data'));
|
||||
});
|
||||
|
||||
|
||||
//预定义颜色项
|
||||
colorpicker.render({
|
||||
elem: '#color'
|
||||
,color: '#393d49'
|
||||
,predefine: true // 开启预定义颜色
|
||||
,size: 'xs'
|
||||
,done: function(color){
|
||||
//改变标题颜色
|
||||
$('h1').css("color", color);
|
||||
var id = {$article.id};
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:"{:url('Article/titleColor')}",
|
||||
data:{id: id,title_color: color},
|
||||
dataType:'json',
|
||||
success:function(data){
|
||||
if(data.code == 0){
|
||||
layer.msg(data.msg,{icon:6,time:2000
|
||||
});
|
||||
} else {
|
||||
layer.open({content:data.msg,icon:5,adim:6});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//评论需要登陆
|
||||
form.on('submit(user-comment)',function (data){
|
||||
var filed = data.field;
|
||||
if (uid == -1) {
|
||||
layer.msg('请先登陆',{icon:5,time:2000},function(){
|
||||
location.href = "{:url('login/index')}";
|
||||
});
|
||||
} else {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "{:url('article/comment')}",
|
||||
data: filed,
|
||||
dataType: "json",
|
||||
success:function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg(data.msg,{icon:6,time:2000},function () {
|
||||
location.reload(true);
|
||||
});
|
||||
}else {
|
||||
layer.open({title:'评论失败',content:data.msg,icon:5,anim:6});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
//下载
|
||||
$('#zip-download').click(function (){
|
||||
var id = "{$article.id}";
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url:"{:url('article/download')}",
|
||||
data:{id:id},
|
||||
success:function (data) {
|
||||
location.href = "{:url('article/download',['id'=>$article.id])}";
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//如果你是采用模版自带的编辑器,你需要开启以下语句来解析。
|
||||
$('.detail-body').each(function(){
|
||||
var othis = $(this), html = othis.html();
|
||||
othis.html(fly.content(html));
|
||||
});
|
||||
//加载播放器
|
||||
plyr.setup();
|
||||
|
||||
});
|
||||
|
||||
//扫码阅读
|
||||
$("#rdown").hover(function(){
|
||||
$("#phonedl").show().stop();
|
||||
},function(){
|
||||
$("#phonedl").hide().stop();
|
||||
});
|
||||
|
||||
$("#phonedl").hover(function(){
|
||||
$("#phonedl").show().stop();
|
||||
},function(){
|
||||
$("#phonedl").hide().stop();
|
||||
});
|
||||
|
||||
function PhoneDown(){
|
||||
layer.open({
|
||||
title: "扫码查阅",
|
||||
skin: 'layui-layer',
|
||||
content: "<img src='/qrcode/?text={$Request.domain}{:url('article/detail',['id' => $article.id])}&size=230'>"
|
||||
});
|
||||
}
|
||||
//推送百度收录服务
|
||||
(function(){
|
||||
var bp = document.createElement('script');
|
||||
var curProtocol = window.location.protocol.split(':')[0];
|
||||
if (curProtocol === 'https') {
|
||||
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
|
||||
}
|
||||
else {
|
||||
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
|
||||
}
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(bp, s);
|
||||
})();
|
||||
</script>
|
||||
{/block}
|
@ -1,318 +0,0 @@
|
||||
{extend name="public/base" /}
|
||||
|
||||
{block name="title"}{$article.title}-{$sysInfo.webname}{/block}
|
||||
{block name="keywords"}{$article.title},{$article.tags}{/block}
|
||||
{block name="description"}{$article.title},{:getArtContent($article.content)}{/block}
|
||||
{block name="link"}<link rel="stylesheet" href="/static/res/css/plyr.css" charset="utf-8">{/block}
|
||||
{block name="column"}<div class="layui-hide-xs">{include file="/public/column" /}</div>{/block}
|
||||
{block name="content"}
|
||||
<div class="layui-container">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md8 content detail">
|
||||
<div class="fly-panel detail-box">
|
||||
{//标题}
|
||||
<h1 style="color:{$article.title_color};">{$article.title}
|
||||
<span class="layui-hide-xs"><div onclick="PhoneDown();" style="" class="detail_qrcode" id="mobile"></div></span>
|
||||
</h1>
|
||||
{//图标}
|
||||
<div class="fly-detail-info">
|
||||
<span class="layui-badge layui-bg-green fly-detail-column">{:cookie('think_lang') == 'en-us' ? $article.cate.ename : $article.cate.catename}</span>
|
||||
{if ($article.is_top == 1)}<span class="layui-badge layui-bg-black">{:lang('top')}</span>{/if}
|
||||
{if ($article.is_hot == 1)}<span class="layui-badge layui-bg-red">{:lang('hot')}</span>{/if}
|
||||
<span id="LAY_jieAdmin" data-id="{$article['id']}"></span>
|
||||
<span class="fly-list-nums">
|
||||
<a href="#comment"><i class="iconfont" title="{:lang('reply')}"></i>{$comments->count()}</a><i class="iconfont" title="浏览"></i>{$pv}
|
||||
</span>
|
||||
</div>
|
||||
{//作者}
|
||||
<div class="detail-about">
|
||||
<a class="fly-avatar" href="{:url('user/home',['id'=>$article.user.id])}">
|
||||
<img src="{$article.user.user_img}" alt="{$article.user.name}">
|
||||
<i class="iconfont icon-renzheng" title="认证信息"></i>
|
||||
</a>
|
||||
<div class="fly-detail-user">
|
||||
<a href="{:url('user/home',['id'=>$article.user.id])}" class="fly-link">
|
||||
{if config('taoler.config.area_show') == 1}<i class="layui-badge layui-bg-green " title="">{:getAsing($article.user.area_id) ?: '无'}</i>{/if}
|
||||
<cite>{$article.user.nickname ?: $article.user.name}</cite>
|
||||
</a>
|
||||
<span class="layui-btn layui-btn-xs guanzhu" >关注</span>
|
||||
</div>
|
||||
<div class="detail-hits">
|
||||
<!--span style="padding-right: 10px; color: #FF7200">悬赏:60飞吻</span-->
|
||||
<span class="post-time" data="{$article.create_time}" style="padding-top: 5px;"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="detail-body photos">{$article.content|raw}</div>
|
||||
{//管理}
|
||||
{if (($article.upzip !== '') || session('?user_name'))}
|
||||
<div class="detail-assist">
|
||||
{notempty name="$article.upzip"}
|
||||
<button type="button" class="layui-btn layui-btn-xs" id="zip-download"><i class="layui-icon layui-icon-download-circle"></i>{:lang('download files')}: {$article.downloads}次</button>
|
||||
{/notempty}
|
||||
<div class="fly-admin-box" data-id="{$article.id}">
|
||||
{if ($user.auth ?? '')}
|
||||
<span class="layui-btn layui-btn-xs jie-admin" type="del"><i class="layui-icon layui-icon-delete"></i></span>
|
||||
{if($article.is_top == 0)}<span class="layui-btn layui-btn-xs jie-admin" type="set" field="top" rank="1"><i class="layui-icon layui-icon-top"></i></span>
|
||||
{else /}<span class="layui-btn layui-btn-xs jie-admin" type="set" field="top" rank="0" style="background-color:#ccc;">{:lang('cancel topping')}</span>{/if}
|
||||
{if($article.is_hot == 0)}
|
||||
<span class="layui-btn layui-btn-xs jie-admin" type="set" field="hot" rank="1"><i class="layui-icon layui-icon-fire"></i></span>
|
||||
{else /}
|
||||
<span class="layui-btn layui-btn-xs jie-admin" type="set" field="hot" rank="0" style="background-color:#ccc;">{:lang('cancel hoting')}</span>
|
||||
{/if}
|
||||
{if($article.is_reply == 1)}
|
||||
<span class="layui-btn layui-btn-xs jie-admin" type="set" field="reply" rank="0"><i class="layui-icon layui-icon-face-cry"></i></span>
|
||||
{else /}
|
||||
<span class="layui-btn layui-btn-xs jie-admin" type="set" field="reply" rank="1" style="background-color:#ccc;">{:lang('enable reply')}</span>
|
||||
{/if}
|
||||
<span id="color">{:lang('title color')}</span>
|
||||
{/if}
|
||||
{if(session('user_name')==$article.user.name || ($user.auth ?? ''))}
|
||||
<span class="layui-btn layui-btn-xs jie-admin" type="edit"><a href="{:url('article/edit',['id'=>$article.id])}">{:lang('edit')}</a></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{//评论}
|
||||
<div class="fly-panel detail-box" id="flyReply">
|
||||
<span style="font-size:18px;">评论 {$comments->count()}</span>
|
||||
<ul class="jieda" id="jieda">
|
||||
{volist name="comments" id="vo" empty= ""}
|
||||
<li data-id="{$vo.id}" class="jieda-daan">
|
||||
<a name="item-1111111111"></a>
|
||||
<div class="detail-about detail-about-reply">
|
||||
<a class="fly-avatar" href="{:url('user/home',['id'=>$vo.user.id])}">
|
||||
<img src="{$vo.user.user_img}" alt=" "><i class="iconfont icon-renzheng" title="认证信息"></i>
|
||||
</a>
|
||||
<div class="fly-detail-user">
|
||||
<a href="{:url('user/home',['id'=>$vo.user.id])}" class="fly-link">
|
||||
{if config('taoler.config.area_show') == 1}<i class="layui-badge layui-bg-green " title="">{:getAsing($vo.user.area_id) ?: '无'}</i>{/if}
|
||||
<cite>{$vo.user.nickname ?: $vo.user.name}</cite>
|
||||
</a>
|
||||
{if condition="$article.user.id eq $vo.user.id"}<span>({:lang('poster')})</span>{/if}
|
||||
</div>
|
||||
<div class="detail-hits"><span class="post-time" data="{$vo.create_time}"></span></div>
|
||||
{if $vo.cai == 1}<i class="iconfont icon-caina" title="最佳答案"></i>{/if}
|
||||
</div>
|
||||
<div class="detail-body jieda-body photos">{$vo.content|raw}</div>
|
||||
<div class="jieda-reply">
|
||||
<span class="jieda-zan {if($vo.zan != 0)}zanok{/if}" type="zan">
|
||||
<i class="iconfont icon-zan"></i><em>{$vo.zan}</em>
|
||||
</span>
|
||||
<span type="reply"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
||||
{//评论编辑删除采纳权限}
|
||||
<div class="jieda-admin">
|
||||
{if ((session('user_id') == $vo.user.id) && (getLimtTime($vo.create_time) < 2)) OR ($user.auth ?? '')}
|
||||
<span type="edit">{:lang('edit')}</span>
|
||||
<span type="del">{:lang('delete')}</span>
|
||||
{/if}
|
||||
{if ($vo.cai == 0) && ((session('user_id') == $article.user_id) OR ($user.auth ?? '')) /}<span class="jieda-accept" type="accept">{:lang('accept')}</span>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<div style="text-align: center">{$comments|raw}</div>
|
||||
{if condition="$article.is_reply == 1"}
|
||||
<div class="layui-form layui-form-pane">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<a name="comment"></a>
|
||||
<div class="layui-input-block">
|
||||
<textarea id="L_content" name="content" required lay-verify="required" placeholder="{:lang('please input the content')}" class="layui-textarea fly-editor" style="height: 150px;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input type="hidden" name="article_id" value="{$article.id}">
|
||||
<input type="hidden" name="user_id" value="{:session('user_id')}">
|
||||
<button class="layui-btn" lay-filter="user-comment" lay-submit>{:lang('submit comments')}</button>
|
||||
</div>
|
||||
</div>
|
||||
{else /}
|
||||
<blockquote class="layui-elem-quote layui-quote-nm layui-disabled" style="margin: 100px 0 20px; padding: 50px 20px; text-align: center; color: #999!important;">本帖已设置禁止回复</blockquote>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title">{:lang('sponsor')}<span style="padding: 0 3px;">-</span>
|
||||
<a href="" class="fly-link fly-joinad">{:lang('i want to join')}</a>
|
||||
</div>
|
||||
<div class="fly-panel-main">
|
||||
{volist name="ad_comm" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: {$vo.slid_color};">{$vo.slid_name}</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
<dl class="fly-panel fly-list-one">
|
||||
<dt class="fly-panel-title">{:lang('hot post list')}</dt>
|
||||
{volist name="artHot" id="vo"}
|
||||
<dd>
|
||||
<a href="{:url('article/detail',['id' => $vo.id])}">{$vo.title}</a>
|
||||
<span><i class="iconfont icon-pinglun1"></i> {$vo.comments_count}</span>
|
||||
</dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center;">
|
||||
{volist name="ad_art" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$vo.slid_img}" style="max-width: 100%;"></a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--底部栏-->
|
||||
<div class="site-tree-mobile-detail-bottom layui-hide-md">
|
||||
<div id="LAY_jieAdmin1" data-id="{$article['id']}"></div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="public/menu" /}
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
var collectionFind = "{:url('Collection/find')}",
|
||||
articleJieset = "{:url('Article/jieset')}",
|
||||
articleDelete = "{:url('Article/delete')}",
|
||||
commentJiedaZan = "{:url('Comment/jiedaZan')}",
|
||||
commentJiedaCai = "{:url('Comment/jiedaCai')}",
|
||||
commentGetDa = "{:url('Comment/getDa')}",
|
||||
commentUpdateDa = "{:url('Comment/updateDa')}",
|
||||
commentJiedaDelete = "{:url('Comment/jiedaDelete')}",
|
||||
langCollection = "{:lang('collection')}",
|
||||
langCancelCollection = "{:lang('cancel collection')}";
|
||||
var collection = "{:url('collection/')}";
|
||||
|
||||
layui.use(['fly', 'face','colorpicker','plyr'], function(){
|
||||
var $ = layui.jquery
|
||||
,form = layui.form
|
||||
,fly = layui.fly
|
||||
,colorpicker = layui.colorpicker
|
||||
,plyr = layui.plyr;
|
||||
var laytpl = layui.laytpl;
|
||||
var uid = layui.cache.user.uid;
|
||||
|
||||
//tpl模板给发布时间赋值
|
||||
$('div.detail-hits').children('span.post-time').each(function(){
|
||||
var othis = $(this), html = othis.html();
|
||||
var string = laytpl('{{ d.time }}').render({
|
||||
//time: html
|
||||
time: othis.attr('data')
|
||||
});
|
||||
var posttime = layui.util.timeAgo(string, 1);
|
||||
|
||||
othis.text(posttime);
|
||||
//console.log(othis.attr('data'));
|
||||
});
|
||||
|
||||
|
||||
//预定义颜色项
|
||||
colorpicker.render({
|
||||
elem: '#color'
|
||||
,color: '#393d49'
|
||||
,predefine: true // 开启预定义颜色
|
||||
,size: 'xs'
|
||||
,done: function(color){
|
||||
//改变标题颜色
|
||||
$('h1').css("color", color);
|
||||
var id = {$article.id};
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:"{:url('Article/titleColor')}",
|
||||
data:{id: id,title_color: color},
|
||||
dataType:'json',
|
||||
success:function(data){
|
||||
if(data.code == 0){
|
||||
layer.msg(data.msg,{icon:6,time:2000
|
||||
});
|
||||
} else {
|
||||
layer.open({content:data.msg,icon:5,adim:6});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//评论需要登陆
|
||||
form.on('submit(user-comment)',function (data){
|
||||
var filed = data.field;
|
||||
if (uid == -1) {
|
||||
layer.msg('请先登陆',{icon:5,time:2000},function(){
|
||||
location.href = "{:url('login/index')}";
|
||||
});
|
||||
} else {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "{:url('article/comment')}",
|
||||
data: filed,
|
||||
dataType: "json",
|
||||
success:function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg(data.msg,{icon:6,time:2000},function () {
|
||||
location.reload(true);
|
||||
});
|
||||
}else {
|
||||
layer.open({title:'评论失败',content:data.msg,icon:5,anim:6});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
//下载
|
||||
$('#zip-download').click(function (){
|
||||
var id = "{$article.id}";
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url:"{:url('article/download')}",
|
||||
data:{id:id},
|
||||
success:function (data) {
|
||||
location.href = "{:url('article/download',['id'=>$article.id])}";
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//如果你是采用模版自带的编辑器,你需要开启以下语句来解析。
|
||||
$('.detail-body').each(function(){
|
||||
var othis = $(this), html = othis.html();
|
||||
othis.html(fly.content(html));
|
||||
});
|
||||
//加载播放器
|
||||
plyr.setup();
|
||||
|
||||
});
|
||||
|
||||
//扫码阅读
|
||||
$("#rdown").hover(function(){
|
||||
$("#phonedl").show().stop();
|
||||
},function(){
|
||||
$("#phonedl").hide().stop();
|
||||
});
|
||||
|
||||
$("#phonedl").hover(function(){
|
||||
$("#phonedl").show().stop();
|
||||
},function(){
|
||||
$("#phonedl").hide().stop();
|
||||
});
|
||||
|
||||
function PhoneDown(){
|
||||
layer.open({
|
||||
title: "扫码查阅",
|
||||
skin: 'layui-layer',
|
||||
content: "<img src='/qrcode/?text={$Request.domain}{:url('article/detail',['id' => $article.id])}&size=230'>"
|
||||
});
|
||||
}
|
||||
//推送百度收录服务
|
||||
(function(){
|
||||
var bp = document.createElement('script');
|
||||
var curProtocol = window.location.protocol.split(':')[0];
|
||||
if (curProtocol === 'https') {
|
||||
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
|
||||
}
|
||||
else {
|
||||
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
|
||||
}
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(bp, s);
|
||||
})();
|
||||
</script>
|
||||
{/block}
|
@ -7,7 +7,7 @@
|
||||
{block name="content"}
|
||||
<div class="layui-container">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md8">
|
||||
<div class="layui-col-md9">
|
||||
<div class="fly-panel" style="margin-bottom: 0;">
|
||||
<ul class="fly-list">
|
||||
{volist name="artList" id="art"}
|
||||
@ -45,7 +45,7 @@
|
||||
<div style="text-align: center" id="pages"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="layui-col-md3">
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel" style="padding: 5px 0; text-align: center;">
|
||||
{volist name="ad_cateImg" id="vo"}
|
||||
|
@ -8,7 +8,7 @@
|
||||
{block name="content"}
|
||||
<div class="layui-container">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md8 content detail">
|
||||
<div class="layui-col-md9 content detail">
|
||||
<div class="fly-panel detail-box">
|
||||
{//标题}
|
||||
<h1 style="color:{$article.title_color};">{$article.title}</h1>
|
||||
@ -132,7 +132,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="layui-col-md3">
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title">{:lang('sponsor')}<span style="padding: 0 3px;">-</span>
|
||||
<a href="" class="fly-link fly-joinad">{:lang('i want to join')}</a>
|
||||
|
Loading…
Reference in New Issue
Block a user