From f634b2f34925f3d3778d6790d7e4cad2bafd119a Mon Sep 17 00:00:00 2001 From: Anyon Date: Wed, 20 May 2020 10:22:45 +0800 Subject: [PATCH] ComposerUpdate --- app/admin/controller/Config.php | 18 +++++++------- composer.lock | 18 +++++++------- vendor/composer/installed.json | 20 ++++++++-------- vendor/league/flysystem/src/Filesystem.php | 2 +- .../flysystem/src/FilesystemInterface.php | 2 +- vendor/league/flysystem/src/MountManager.php | 2 ++ vendor/services.php | 2 +- .../think-library/src/command/Queue.php | 24 +++++++++---------- 8 files changed, 45 insertions(+), 43 deletions(-) diff --git a/app/admin/controller/Config.php b/app/admin/controller/Config.php index d97c6d293..32753e885 100644 --- a/app/admin/controller/Config.php +++ b/app/admin/controller/Config.php @@ -111,16 +111,16 @@ class Config extends Controller if ($this->request->isGet()) { $this->type = input('type', 'local'); $this->fetch("storage-{$this->type}"); + } else { + $post = $this->request->post(); + if (!empty($post['storage']['allow_exts'])) { + $exts = array_unique(explode(',', strtolower($post['storage']['allow_exts']))); + if (sort($exts) && in_array('php', $exts)) $this->error('禁止上传可执行的文件!'); + $post['storage']['allow_exts'] = join(',', $exts); + } + foreach ($post as $name => $value) sysconf($name, $value); + $this->success('修改文件存储成功!'); } - $post = $this->request->post(); - if (!empty($post['storage']['allow_exts'])) { - $exts = array_unique(explode(',', strtolower($post['storage']['allow_exts']))); - if (in_array('php', $exts)) $this->error('禁止上传可执行文件到本地服务器!'); - sort($exts); - $post['storage']['allow_exts'] = join(',', $exts); - } - foreach ($post as $name => $value) sysconf($name, $value); - $this->success('修改文件存储成功!'); } } diff --git a/composer.lock b/composer.lock index fb4cf0749..c365988b1 100644 --- a/composer.lock +++ b/composer.lock @@ -74,16 +74,16 @@ }, { "name": "league/flysystem", - "version": "1.0.68", + "version": "1.0.69", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "3e4198372276ec99ac3409a21d7c9d1ced9026e4" + "reference": "7106f78428a344bc4f643c233a94e48795f10967" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3e4198372276ec99ac3409a21d7c9d1ced9026e4", - "reference": "3e4198372276ec99ac3409a21d7c9d1ced9026e4", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967", + "reference": "7106f78428a344bc4f643c233a94e48795f10967", "shasum": "", "mirrors": [ { @@ -166,7 +166,7 @@ "type": "other" } ], - "time": "2020-05-12T20:33:44+00:00" + "time": "2020-05-18T15:13:39+00:00" }, { "name": "league/flysystem-cached-adapter", @@ -915,12 +915,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "98dce0c32ecde5bdf1e60a3572d8ece6fe828c37" + "reference": "08dbda6ff99e8c4c531deaad340679b9366f7c0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/98dce0c32ecde5bdf1e60a3572d8ece6fe828c37", - "reference": "98dce0c32ecde5bdf1e60a3572d8ece6fe828c37", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/08dbda6ff99e8c4c531deaad340679b9366f7c0b", + "reference": "08dbda6ff99e8c4c531deaad340679b9366f7c0b", "shasum": "", "mirrors": [ { @@ -964,7 +964,7 @@ ], "description": "ThinkPHP v6.0 Development Library", "homepage": "http://framework.thinkadmin.top", - "time": "2020-05-16T08:45:15+00:00" + "time": "2020-05-19T08:03:38+00:00" }, { "name": "zoujingli/wechat-developer", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index ca7885a4b..005b252bd 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -69,17 +69,17 @@ }, { "name": "league/flysystem", - "version": "1.0.68", - "version_normalized": "1.0.68.0", + "version": "1.0.69", + "version_normalized": "1.0.69.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "3e4198372276ec99ac3409a21d7c9d1ced9026e4" + "reference": "7106f78428a344bc4f643c233a94e48795f10967" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3e4198372276ec99ac3409a21d7c9d1ced9026e4", - "reference": "3e4198372276ec99ac3409a21d7c9d1ced9026e4", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967", + "reference": "7106f78428a344bc4f643c233a94e48795f10967", "shasum": "", "mirrors": [ { @@ -115,7 +115,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": "2020-05-12T20:33:44+00:00", + "time": "2020-05-18T15:13:39+00:00", "type": "library", "extra": { "branch-alias": { @@ -941,12 +941,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "98dce0c32ecde5bdf1e60a3572d8ece6fe828c37" + "reference": "08dbda6ff99e8c4c531deaad340679b9366f7c0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/98dce0c32ecde5bdf1e60a3572d8ece6fe828c37", - "reference": "98dce0c32ecde5bdf1e60a3572d8ece6fe828c37", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/08dbda6ff99e8c4c531deaad340679b9366f7c0b", + "reference": "08dbda6ff99e8c4c531deaad340679b9366f7c0b", "shasum": "", "mirrors": [ { @@ -962,7 +962,7 @@ "ext-json": "*", "topthink/framework": "^6.0" }, - "time": "2020-05-16T08:45:15+00:00", + "time": "2020-05-19T08:03:38+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/league/flysystem/src/Filesystem.php b/vendor/league/flysystem/src/Filesystem.php index 45095263c..0ce24845a 100644 --- a/vendor/league/flysystem/src/Filesystem.php +++ b/vendor/league/flysystem/src/Filesystem.php @@ -301,7 +301,7 @@ class Filesystem implements FilesystemInterface return false; } - return $object['timestamp']; + return (int) $object['timestamp']; } /** diff --git a/vendor/league/flysystem/src/FilesystemInterface.php b/vendor/league/flysystem/src/FilesystemInterface.php index 09b811b1d..a6b99ba06 100644 --- a/vendor/league/flysystem/src/FilesystemInterface.php +++ b/vendor/league/flysystem/src/FilesystemInterface.php @@ -87,7 +87,7 @@ interface FilesystemInterface * * @throws FileNotFoundException * - * @return string|false The timestamp or false on failure. + * @return int|false The timestamp or false on failure. */ public function getTimestamp($path); diff --git a/vendor/league/flysystem/src/MountManager.php b/vendor/league/flysystem/src/MountManager.php index 620f540ea..150aee3a8 100644 --- a/vendor/league/flysystem/src/MountManager.php +++ b/vendor/league/flysystem/src/MountManager.php @@ -20,6 +20,8 @@ use League\Flysystem\Plugin\PluginNotFoundException; * @method void assertPresent($path) * @method void assertAbsent($path) * @method Filesystem addPlugin(PluginInterface $plugin) + * + * @deprecated This functionality will be removed in 2.0 */ class MountManager implements FilesystemInterface { diff --git a/vendor/services.php b/vendor/services.php index 7b5cf4538..305e97627 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\app\\Service', diff --git a/vendor/zoujingli/think-library/src/command/Queue.php b/vendor/zoujingli/think-library/src/command/Queue.php index 8aaa36408..be09968e7 100644 --- a/vendor/zoujingli/think-library/src/command/Queue.php +++ b/vendor/zoujingli/think-library/src/command/Queue.php @@ -52,9 +52,9 @@ class Queue extends Command $this->addArgument('action', Argument::OPTIONAL, 'stop|start|status|query|listen|clean|dorun|webstop|webstart|webstatus', 'listen'); $this->addArgument('code', Argument::OPTIONAL, 'Taskcode'); $this->addArgument('spts', Argument::OPTIONAL, 'Separator'); + $this->addOption('host', '-H', Option::VALUE_OPTIONAL, 'The host of WebServer.'); + $this->addOption('port', '-p', Option::VALUE_OPTIONAL, 'The port of WebServer.'); $this->addOption('daemon', 'd', Option::VALUE_NONE, 'Run the queue listen in daemon mode'); - $this->addOption('host', '-H', Option::VALUE_OPTIONAL, 'The host of PHP WebServer.'); - $this->addOption('port', '-p', Option::VALUE_OPTIONAL, 'The port of PHP WebServer.'); $this->setDescription('Asynchronous Command Queue Task for ThinkAdmin'); } @@ -78,10 +78,10 @@ class Queue extends Command { $root = "{$this->app->getRootPath()}public" . DIRECTORY_SEPARATOR; if (count($result = $this->process->query("-t {$root} {$root}router.php")) < 1) { - $this->output->warning("There is no WebServer process to finish"); + $this->output->writeln("There are no WebServer processes to stop"); } else foreach ($result as $item) { $this->process->close($item['pid']); - $this->output->writeln("Sending end process {$item['pid']} signal succeeded"); + $this->output->writeln("Successfully sent end signal to process {$item['pid']}"); } } @@ -98,16 +98,16 @@ class Queue extends Command if ($this->process->iswin()) { $this->process->exec("start http://{$host}:{$port}"); } - $this->output->info("WebServer process {$result['0']['pid']} has started"); + $this->output->writeln("WebServer process already exist for pid {$result['0']['pid']}"); } else { [$this->process->create($command), usleep(2000)]; if (count($result = $this->process->query($command)) > 0) { - $this->output->info("WebServer process {$result['0']['pid']} started successfully"); + $this->output->writeln("WebServer process started successfully for pid {$result['0']['pid']}"); if ($this->process->iswin()) { $this->process->exec("start http://{$host}:{$port}"); } } else { - $this->output->error('Failed to create WebServer process'); + $this->output->writeln('WebServer process failed to start'); } } } @@ -133,10 +133,10 @@ class Queue extends Command { $keyword = $this->process->think('xadmin:queue'); if (count($result = $this->process->query($keyword)) < 1) { - $this->output->warning("There is no task process to finish"); + $this->output->writeln("There are no task processes to stop"); } else foreach ($result as $item) { $this->process->close($item['pid']); - $this->output->writeln("Sending end process {$item['pid']} signal succeeded"); + $this->output->writeln("Successfully sent end signal to process {$item['pid']}"); } } @@ -148,13 +148,13 @@ class Queue extends Command $this->app->db->name($this->table)->count(); $command = $this->process->think("xadmin:queue listen"); if (count($result = $this->process->query($command)) > 0) { - $this->output->info("Listening main process {$result['0']['pid']} has started"); + $this->output->writeln("Asynchronous daemons already exist for pid {$result[0]['pid']}"); } else { [$this->process->create($command), usleep(1000)]; if (count($result = $this->process->query($command)) > 0) { - $this->output->info("Listening main process {$result['0']['pid']} started successfully"); + $this->output->writeln("Asynchronous daemons started successfully for pid {$result[0]['pid']}"); } else { - $this->output->error('Failed to create listening main process'); + $this->output->writeln("Asynchronous daemons failed to start"); } } }