mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
a2be78f3e8
commit
43af29ec1c
@ -46,11 +46,12 @@ class Plugs extends Controller
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (AdminService::instance()->isSuper()) {
|
if (AdminService::instance()->isSuper()) {
|
||||||
$this->error('只有超级管理员才能操作!');
|
|
||||||
}
|
|
||||||
$this->app->console->call('optimize:route');
|
$this->app->console->call('optimize:route');
|
||||||
$this->app->console->call('optimize:schema');
|
$this->app->console->call('optimize:schema');
|
||||||
$this->success('网站缓存加速成功!');
|
$this->success('网站缓存加速成功!');
|
||||||
|
} else {
|
||||||
|
$this->error('只有超级管理员才能操作!');
|
||||||
|
}
|
||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
@ -66,12 +67,13 @@ class Plugs extends Controller
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (AdminService::instance()->isSuper()) {
|
if (AdminService::instance()->isSuper()) {
|
||||||
$this->error('只有超级管理员才能操作!');
|
|
||||||
}
|
|
||||||
$data = SystemService::instance()->getRuntime();
|
$data = SystemService::instance()->getRuntime();
|
||||||
$this->app->console->call('clear');
|
$this->app->console->call('clear');
|
||||||
SystemService::instance()->setRuntime($data['app_map'], $data['app_run']);
|
SystemService::instance()->setRuntime($data['app_map'], $data['app_run']);
|
||||||
$this->success('清理网站缓存成功!');
|
$this->success('清理网站缓存成功!');
|
||||||
|
} else {
|
||||||
|
$this->error('只有超级管理员才能操作!');
|
||||||
|
}
|
||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
@ -85,16 +87,17 @@ class Plugs extends Controller
|
|||||||
*/
|
*/
|
||||||
public function debug()
|
public function debug()
|
||||||
{
|
{
|
||||||
if (input('state')) {
|
|
||||||
if (AdminService::instance()->isSuper()) {
|
if (AdminService::instance()->isSuper()) {
|
||||||
$this->error('只有超级管理员才能操作!');
|
if (input('state')) {
|
||||||
}
|
|
||||||
SystemService::instance()->productMode(true);
|
SystemService::instance()->productMode(true);
|
||||||
$this->success('已切换为生产模式!');
|
$this->success('已切换为生产模式!');
|
||||||
} else {
|
} else {
|
||||||
SystemService::instance()->productMode(false);
|
SystemService::instance()->productMode(false);
|
||||||
$this->success('已切换为开发模式!');
|
$this->success('已切换为开发模式!');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$this->error('只有超级管理员才能操作!');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -104,9 +107,10 @@ class Plugs extends Controller
|
|||||||
public function optimize()
|
public function optimize()
|
||||||
{
|
{
|
||||||
if (AdminService::instance()->isSuper()) {
|
if (AdminService::instance()->isSuper()) {
|
||||||
|
$this->_queue('优化数据库所有数据表', 'xadmin:dbOptimize', 0, [], 0, 0);
|
||||||
|
} else {
|
||||||
$this->error('只有超级管理员才能操作!');
|
$this->error('只有超级管理员才能操作!');
|
||||||
}
|
}
|
||||||
$this->_queue('优化数据库所有数据表', 'xadmin:dbOptimize', 0, [], 0, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
12
composer.lock
generated
12
composer.lock
generated
@ -498,16 +498,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/options-resolver",
|
"name": "symfony/options-resolver",
|
||||||
"version": "v3.4.39",
|
"version": "v3.4.40",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/options-resolver.git",
|
"url": "https://github.com/symfony/options-resolver.git",
|
||||||
"reference": "730ef56164ed6c9356c159e9f5ff2b84d753b9ed"
|
"reference": "79701529391f802604ec92080364d617f029974b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/730ef56164ed6c9356c159e9f5ff2b84d753b9ed",
|
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/79701529391f802604ec92080364d617f029974b",
|
||||||
"reference": "730ef56164ed6c9356c159e9f5ff2b84d753b9ed",
|
"reference": "79701529391f802604ec92080364d617f029974b",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -554,7 +554,7 @@
|
|||||||
"configuration",
|
"configuration",
|
||||||
"options"
|
"options"
|
||||||
],
|
],
|
||||||
"time": "2020-01-01T11:03:25+00:00"
|
"time": "2020-04-06T08:30:32+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/framework",
|
"name": "topthink/framework",
|
||||||
@ -1024,7 +1024,7 @@
|
|||||||
"wechatpay",
|
"wechatpay",
|
||||||
"wepay"
|
"wepay"
|
||||||
],
|
],
|
||||||
"time": "2020-04-26T03:12:37+00:00"
|
"time": "2020-04-26T03:22:09+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
|
||||||
return ComposerAutoloaderInit4ceee63a2cdf20349907f5909444af96::getLoader();
|
return ComposerAutoloaderInitf41e9df38a61a147f539b835fbd021f0::getLoader();
|
||||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// autoload_real.php @generated by Composer
|
// autoload_real.php @generated by Composer
|
||||||
|
|
||||||
class ComposerAutoloaderInit4ceee63a2cdf20349907f5909444af96
|
class ComposerAutoloaderInitf41e9df38a61a147f539b835fbd021f0
|
||||||
{
|
{
|
||||||
private static $loader;
|
private static $loader;
|
||||||
|
|
||||||
@ -19,15 +19,15 @@ class ComposerAutoloaderInit4ceee63a2cdf20349907f5909444af96
|
|||||||
return self::$loader;
|
return self::$loader;
|
||||||
}
|
}
|
||||||
|
|
||||||
spl_autoload_register(array('ComposerAutoloaderInit4ceee63a2cdf20349907f5909444af96', 'loadClassLoader'), true, true);
|
spl_autoload_register(array('ComposerAutoloaderInitf41e9df38a61a147f539b835fbd021f0', 'loadClassLoader'), true, true);
|
||||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||||
spl_autoload_unregister(array('ComposerAutoloaderInit4ceee63a2cdf20349907f5909444af96', 'loadClassLoader'));
|
spl_autoload_unregister(array('ComposerAutoloaderInitf41e9df38a61a147f539b835fbd021f0', 'loadClassLoader'));
|
||||||
|
|
||||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||||
if ($useStaticLoader) {
|
if ($useStaticLoader) {
|
||||||
require_once __DIR__ . '/autoload_static.php';
|
require_once __DIR__ . '/autoload_static.php';
|
||||||
|
|
||||||
call_user_func(\Composer\Autoload\ComposerStaticInit4ceee63a2cdf20349907f5909444af96::getInitializer($loader));
|
call_user_func(\Composer\Autoload\ComposerStaticInitf41e9df38a61a147f539b835fbd021f0::getInitializer($loader));
|
||||||
} else {
|
} else {
|
||||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||||
foreach ($map as $namespace => $path) {
|
foreach ($map as $namespace => $path) {
|
||||||
@ -48,19 +48,19 @@ class ComposerAutoloaderInit4ceee63a2cdf20349907f5909444af96
|
|||||||
$loader->register(true);
|
$loader->register(true);
|
||||||
|
|
||||||
if ($useStaticLoader) {
|
if ($useStaticLoader) {
|
||||||
$includeFiles = Composer\Autoload\ComposerStaticInit4ceee63a2cdf20349907f5909444af96::$files;
|
$includeFiles = Composer\Autoload\ComposerStaticInitf41e9df38a61a147f539b835fbd021f0::$files;
|
||||||
} else {
|
} else {
|
||||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||||
}
|
}
|
||||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||||
composerRequire4ceee63a2cdf20349907f5909444af96($fileIdentifier, $file);
|
composerRequiref41e9df38a61a147f539b835fbd021f0($fileIdentifier, $file);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $loader;
|
return $loader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function composerRequire4ceee63a2cdf20349907f5909444af96($fileIdentifier, $file)
|
function composerRequiref41e9df38a61a147f539b835fbd021f0($fileIdentifier, $file)
|
||||||
{
|
{
|
||||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||||
require $file;
|
require $file;
|
||||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace Composer\Autoload;
|
namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInit4ceee63a2cdf20349907f5909444af96
|
class ComposerStaticInitf41e9df38a61a147f539b835fbd021f0
|
||||||
{
|
{
|
||||||
public static $files = array (
|
public static $files = array (
|
||||||
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
|
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
|
||||||
@ -636,9 +636,9 @@ class ComposerStaticInit4ceee63a2cdf20349907f5909444af96
|
|||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInit4ceee63a2cdf20349907f5909444af96::$prefixLengthsPsr4;
|
$loader->prefixLengthsPsr4 = ComposerStaticInitf41e9df38a61a147f539b835fbd021f0::$prefixLengthsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInit4ceee63a2cdf20349907f5909444af96::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitf41e9df38a61a147f539b835fbd021f0::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInit4ceee63a2cdf20349907f5909444af96::$classMap;
|
$loader->classMap = ComposerStaticInitf41e9df38a61a147f539b835fbd021f0::$classMap;
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
}, null, ClassLoader::class);
|
||||||
}
|
}
|
||||||
|
14
vendor/composer/installed.json
vendored
14
vendor/composer/installed.json
vendored
@ -507,17 +507,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/options-resolver",
|
"name": "symfony/options-resolver",
|
||||||
"version": "v3.4.39",
|
"version": "v3.4.40",
|
||||||
"version_normalized": "3.4.39.0",
|
"version_normalized": "3.4.40.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/options-resolver.git",
|
"url": "https://github.com/symfony/options-resolver.git",
|
||||||
"reference": "730ef56164ed6c9356c159e9f5ff2b84d753b9ed"
|
"reference": "79701529391f802604ec92080364d617f029974b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/730ef56164ed6c9356c159e9f5ff2b84d753b9ed",
|
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/79701529391f802604ec92080364d617f029974b",
|
||||||
"reference": "730ef56164ed6c9356c159e9f5ff2b84d753b9ed",
|
"reference": "79701529391f802604ec92080364d617f029974b",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -529,7 +529,7 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": "^5.5.9|>=7.0.8"
|
"php": "^5.5.9|>=7.0.8"
|
||||||
},
|
},
|
||||||
"time": "2020-01-01T11:03:25+00:00",
|
"time": "2020-04-06T08:30:32+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@ -1019,7 +1019,7 @@
|
|||||||
"ext-xml": "*",
|
"ext-xml": "*",
|
||||||
"php": ">=5.4"
|
"php": ">=5.4"
|
||||||
},
|
},
|
||||||
"time": "2020-04-26T03:12:37+00:00",
|
"time": "2020-04-26T03:22:09+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2020-04-28 09:49:18
|
// This file is automatically generated at:2020-04-30 14:37:31
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\app\\Service',
|
0 => 'think\\app\\Service',
|
||||||
|
@ -44,7 +44,7 @@ class OptionsResolverIntrospectorTest extends TestCase
|
|||||||
$resolver->setDefined($option = 'foo');
|
$resolver->setDefined($option = 'foo');
|
||||||
|
|
||||||
$debug = new OptionsResolverIntrospector($resolver);
|
$debug = new OptionsResolverIntrospector($resolver);
|
||||||
$this->assertSame('bar', $debug->getDefault($option));
|
$debug->getDefault($option);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetDefaultThrowsOnNotDefinedOption()
|
public function testGetDefaultThrowsOnNotDefinedOption()
|
||||||
@ -54,7 +54,7 @@ class OptionsResolverIntrospectorTest extends TestCase
|
|||||||
$resolver = new OptionsResolver();
|
$resolver = new OptionsResolver();
|
||||||
|
|
||||||
$debug = new OptionsResolverIntrospector($resolver);
|
$debug = new OptionsResolverIntrospector($resolver);
|
||||||
$this->assertSame('bar', $debug->getDefault('foo'));
|
$debug->getDefault('foo');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetLazyClosures()
|
public function testGetLazyClosures()
|
||||||
@ -75,7 +75,7 @@ class OptionsResolverIntrospectorTest extends TestCase
|
|||||||
$resolver->setDefined($option = 'foo');
|
$resolver->setDefined($option = 'foo');
|
||||||
|
|
||||||
$debug = new OptionsResolverIntrospector($resolver);
|
$debug = new OptionsResolverIntrospector($resolver);
|
||||||
$this->assertSame('bar', $debug->getLazyClosures($option));
|
$debug->getLazyClosures($option);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetLazyClosuresThrowsOnNotDefinedOption()
|
public function testGetLazyClosuresThrowsOnNotDefinedOption()
|
||||||
@ -85,7 +85,7 @@ class OptionsResolverIntrospectorTest extends TestCase
|
|||||||
$resolver = new OptionsResolver();
|
$resolver = new OptionsResolver();
|
||||||
|
|
||||||
$debug = new OptionsResolverIntrospector($resolver);
|
$debug = new OptionsResolverIntrospector($resolver);
|
||||||
$this->assertSame('bar', $debug->getLazyClosures('foo'));
|
$debug->getLazyClosures('foo');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetAllowedTypes()
|
public function testGetAllowedTypes()
|
||||||
|
@ -171,17 +171,14 @@ class Tools
|
|||||||
*/
|
*/
|
||||||
public static function xml3arr($xml)
|
public static function xml3arr($xml)
|
||||||
{
|
{
|
||||||
if (xml_parse($parser = xml_parser_create(), $xml, true)) {
|
$state = xml_parse($parser = xml_parser_create(), $xml, true);
|
||||||
return json_decode(json_encode(simplexml_load_string($xml)), true);
|
return xml_parser_free($parser) && $state ? self::xml2arr($xml) : false;
|
||||||
}
|
|
||||||
if (is_resource($parser)) xml_parser_free($parser);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数组转xml内容
|
* 数组转xml内容
|
||||||
* @param array $data
|
* @param array $data
|
||||||
* @return null|string|string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public static function arr2json($data)
|
public static function arr2json($data)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user