ComposerUpdate

This commit is contained in:
邹景立 2019-11-30 13:46:53 +08:00
parent c4c088f7be
commit 061ca19c1e
4 changed files with 57 additions and 56 deletions

View File

@ -279,7 +279,7 @@ class ClassLoader
*/ */
public function setApcuPrefix($apcuPrefix) public function setApcuPrefix($apcuPrefix)
{ {
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
} }
/** /**
@ -379,9 +379,9 @@ class ClassLoader
$subPath = substr($subPath, 0, $lastPos); $subPath = substr($subPath, 0, $lastPos);
$search = $subPath.'\\'; $search = $subPath.'\\';
if (isset($this->prefixDirsPsr4[$search])) { if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) { foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) { $length = $this->prefixLengthsPsr4[$first][$search];
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
return $file; return $file;
} }
} }

View File

@ -394,56 +394,6 @@
"Ip2Region" "Ip2Region"
] ]
}, },
{
"name": "zoujingli/think-library",
"version": "v5.1.x-dev",
"version_normalized": "5.1.9999999.9999999-dev",
"source": {
"type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "133208dd758a04629de74e740878fa94a71bf4ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/133208dd758a04629de74e740878fa94a71bf4ec",
"reference": "133208dd758a04629de74e740878fa94a71bf4ec",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"aliyuncs/oss-sdk-php": "^2.3",
"ext-curl": "*",
"ext-gd": "*",
"ext-iconv": "*",
"ext-json": "*",
"ext-openssl": "*",
"php": ">=5.4",
"qiniu/php-sdk": "^7.2",
"topthink/framework": "5.1.*"
},
"time": "2019-11-29T02:10:05+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"src/common.php"
],
"psr-4": {
"library\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "ThinkPHP Basic Development Library",
"homepage": "http://framework.thinkadmin.top"
},
{ {
"name": "zoujingli/wechat-developer", "name": "zoujingli/wechat-developer",
"version": "v1.2.15", "version": "v1.2.15",
@ -566,5 +516,55 @@
"WeChatOpenDeveloper", "WeChatOpenDeveloper",
"wechat" "wechat"
] ]
},
{
"name": "zoujingli/think-library",
"version": "v5.1.x-dev",
"version_normalized": "5.1.9999999.9999999-dev",
"source": {
"type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "378899fdcddb3d7217783ba3ea8f2eca1767df12"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/378899fdcddb3d7217783ba3ea8f2eca1767df12",
"reference": "378899fdcddb3d7217783ba3ea8f2eca1767df12",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"aliyuncs/oss-sdk-php": "^2.3",
"ext-curl": "*",
"ext-gd": "*",
"ext-iconv": "*",
"ext-json": "*",
"ext-openssl": "*",
"php": ">=5.4",
"qiniu/php-sdk": "^7.2",
"topthink/framework": "5.1.*"
},
"time": "2019-11-30T05:43:13+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"src/common.php"
],
"psr-4": {
"library\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "ThinkPHP Basic Development Library",
"homepage": "http://framework.thinkadmin.top"
} }
] ]

View File

@ -13,6 +13,7 @@
// | github 仓库地址 https://github.com/zoujingli/ThinkLibrary // | github 仓库地址 https://github.com/zoujingli/ThinkLibrary
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
use library\service\TokenService;
use library\tools\Crypt; use library\tools\Crypt;
use library\tools\Csrf; use library\tools\Csrf;
use library\tools\Data; use library\tools\Data;
@ -105,7 +106,7 @@ if (!function_exists('systoken')) {
*/ */
function systoken($node = null) function systoken($node = null)
{ {
$csrf = Csrf::buildFormToken(Node::get($node)); $csrf = TokenService::instance()->buildFormToken($node);
return $csrf['token']; return $csrf['token'];
} }
} }

View File

@ -30,7 +30,7 @@ class TokenService extends Service
*/ */
public function getInputToken() public function getInputToken()
{ {
return $this->app->request->header('User-Token-Csrf', input('_token_', '')); return $this->app->request->header('user-token-csrf', input('_token_', ''));
} }
/** /**