From c25d007246dd47273e58f7274690d71135f54c62 Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 24 Aug 2020 13:26:46 +0800 Subject: [PATCH] ComposerUpdate --- composer.lock | 8 ++++---- vendor/composer/installed.json | 8 ++++---- vendor/services.php | 2 +- .../zoujingli/think-library/src/service/ModuleService.php | 7 +++---- .../zoujingli/think-library/src/service/NodeService.php | 4 ++-- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/composer.lock b/composer.lock index 0c2d8a65d..72a5ec31d 100644 --- a/composer.lock +++ b/composer.lock @@ -937,12 +937,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "f0c49e28928af221123c15022dc352423439dbc1" + "reference": "5caa2ceb15d1a311ee1cfc7cc7a4ec12a7ee540c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/f0c49e28928af221123c15022dc352423439dbc1", - "reference": "f0c49e28928af221123c15022dc352423439dbc1", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/5caa2ceb15d1a311ee1cfc7cc7a4ec12a7ee540c", + "reference": "5caa2ceb15d1a311ee1cfc7cc7a4ec12a7ee540c", "shasum": "", "mirrors": [ { @@ -987,7 +987,7 @@ ], "description": "ThinkPHP v6.0 Development Library", "homepage": "http://thinkadmin.top", - "time": "2020-08-24T05:13:21+00:00" + "time": "2020-08-24T05:23:03+00:00" }, { "name": "zoujingli/wechat-developer", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 7e2e638ec..1eb277564 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -963,12 +963,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "f0c49e28928af221123c15022dc352423439dbc1" + "reference": "5caa2ceb15d1a311ee1cfc7cc7a4ec12a7ee540c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/f0c49e28928af221123c15022dc352423439dbc1", - "reference": "f0c49e28928af221123c15022dc352423439dbc1", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/5caa2ceb15d1a311ee1cfc7cc7a4ec12a7ee540c", + "reference": "5caa2ceb15d1a311ee1cfc7cc7a4ec12a7ee540c", "shasum": "", "mirrors": [ { @@ -985,7 +985,7 @@ "ext-mbstring": "*", "topthink/framework": "^6.0" }, - "time": "2020-08-24T05:13:21+00:00", + "time": "2020-08-24T05:23:03+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index 8391b7f4e..be0132c03 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\admin\\Library', diff --git a/vendor/zoujingli/think-library/src/service/ModuleService.php b/vendor/zoujingli/think-library/src/service/ModuleService.php index e4e6da9ff..f5c80d031 100644 --- a/vendor/zoujingli/think-library/src/service/ModuleService.php +++ b/vendor/zoujingli/think-library/src/service/ModuleService.php @@ -148,9 +148,8 @@ class ModuleService extends Service foreach ($service->getModules() as $name) { $vars = $this->_getModuleVersion($name); if (is_array($vars) && isset($vars['version']) && preg_match('|^\d{4}\.\d{2}\.\d{2}\.\d{2}$|', $vars['version'])) { - $data[$name] = $vars; - $data[$name]['change'] = []; - foreach ($service->scanDirectory($this->app->getBasePath() . $name . '/module/change/', [], '.md') as $file) { + $data[$name] = array_merge($vars, ['change' => []]); + foreach ($service->scanDirectory($this->app->getBasePath() . $name . '/module/change/', [], 'md') as $file) { $data[$name]['change'][pathinfo($file, PATHINFO_FILENAME)] = Parsedown::instance()->parse(file_get_contents($file)); } } @@ -199,7 +198,7 @@ class ModuleService extends Service private function _getModuleVersion($name) { $appdir = $this->app->getBasePath() . $name; - $filename = $appdir . DIRECTORY_SEPARATOR . 'module' . DIRECTORY_SEPARATOR . 'version.json'; + $filename = $appdir . DIRECTORY_SEPARATOR . 'module' . DIRECTORY_SEPARATOR . 'module.json'; if (file_exists($filename) && is_file($filename) && is_readable($filename)) { $vars = json_decode(file_get_contents($filename), true); return isset($vars['name']) && isset($vars['version']) ? $vars : null; diff --git a/vendor/zoujingli/think-library/src/service/NodeService.php b/vendor/zoujingli/think-library/src/service/NodeService.php index 25aad497e..4dc973227 100644 --- a/vendor/zoujingli/think-library/src/service/NodeService.php +++ b/vendor/zoujingli/think-library/src/service/NodeService.php @@ -141,13 +141,13 @@ class NodeService extends Service * @param string $ext 文件后缀 * @return array */ - public function scanDirectory($path, $data = [], $ext = '.php') + public function scanDirectory($path, $data = [], $ext = 'php') { foreach (scandir($path) as $item) if ($item[0] !== '.') { $realpath = rtrim($path, '\\/') . DIRECTORY_SEPARATOR . $item; if (is_readable($realpath)) if (is_dir($realpath)) { $data = $this->scanDirectory($realpath, $data, $ext); - } elseif (is_file($realpath) && (is_null($ext) || strstr($realpath, '.') === $ext)) { + } elseif (is_file($realpath) && (is_null($ext) || pathinfo($realpath, 4) === $ext)) { $data[] = $realpath; } }