diff --git a/composer.lock b/composer.lock index 12fddc9bd..6f2a76316 100644 --- a/composer.lock +++ b/composer.lock @@ -937,12 +937,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "c2a6046bfaa13a9d42a2c82a18425c9d5841c5f2" + "reference": "62a79d2ab6f1e4bf79e2c5bac8f1e659109a9242" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/c2a6046bfaa13a9d42a2c82a18425c9d5841c5f2", - "reference": "c2a6046bfaa13a9d42a2c82a18425c9d5841c5f2", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/62a79d2ab6f1e4bf79e2c5bac8f1e659109a9242", + "reference": "62a79d2ab6f1e4bf79e2c5bac8f1e659109a9242", "shasum": "", "mirrors": [ { @@ -987,7 +987,7 @@ ], "description": "ThinkPHP v6.0 Development Library", "homepage": "http://thinkadmin.top", - "time": "2020-08-24T05:58:10+00:00" + "time": "2020-08-24T06:25:31+00:00" }, { "name": "zoujingli/wechat-developer", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 50211b1d8..df9269cc0 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": "c2a6046bfaa13a9d42a2c82a18425c9d5841c5f2" + "reference": "62a79d2ab6f1e4bf79e2c5bac8f1e659109a9242" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/c2a6046bfaa13a9d42a2c82a18425c9d5841c5f2", - "reference": "c2a6046bfaa13a9d42a2c82a18425c9d5841c5f2", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/62a79d2ab6f1e4bf79e2c5bac8f1e659109a9242", + "reference": "62a79d2ab6f1e4bf79e2c5bac8f1e659109a9242", "shasum": "", "mirrors": [ { @@ -985,7 +985,7 @@ "ext-mbstring": "*", "topthink/framework": "^6.0" }, - "time": "2020-08-24T05:58:10+00:00", + "time": "2020-08-24T06:25:31+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index 36c589b33..cc8c6a8ef 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/InstallService.php b/vendor/zoujingli/think-library/src/service/InstallService.php index 40d3b6c2b..ca2e199a4 100644 --- a/vendor/zoujingli/think-library/src/service/InstallService.php +++ b/vendor/zoujingli/think-library/src/service/InstallService.php @@ -58,7 +58,7 @@ class InstallService extends Service // 扫描规则文件 foreach ($rules as $key => $rule) { $name = strtr(trim($rule, '\\/'), '\\', '/'); - $data = array_merge($data, $this->_scanList("{$this->root}{$name}")); + $data = array_merge($data, $this->_scanList($this->root . $name)); } // 清除忽略文件 foreach ($data as $key => $item) foreach ($ignore as $ign) { @@ -77,7 +77,7 @@ class InstallService extends Service public function grenerateDifference(array $rules = [], array $ignore = []): array { [$rules1, $ignore1, $data] = [$rules, $ignore, []]; - $result = json_decode(HttpExtend::post("{$this->server}/admin/api.update/node", [ + $result = json_decode(HttpExtend::post($this->server . '/admin/api.update/node', [ 'rules' => json_encode($rules1), 'ignore' => json_encode($ignore1), ]), true); if (!empty($result['code'])) { @@ -122,7 +122,7 @@ class InstallService extends Service */ private function _downloadFile($encode) { - $source = "{$this->server}/admin/api.update/get?encode={$encode}"; + $source = $this->server . '/admin/api.update/get?encode=' . $encode; $result = json_decode(HttpExtend::get($source), true); if (empty($result['code'])) return false; $filename = $this->root . decode($encode); diff --git a/vendor/zoujingli/think-library/src/service/ModuleService.php b/vendor/zoujingli/think-library/src/service/ModuleService.php index 1ab74a8e1..df1c6e629 100644 --- a/vendor/zoujingli/think-library/src/service/ModuleService.php +++ b/vendor/zoujingli/think-library/src/service/ModuleService.php @@ -147,7 +147,7 @@ class ModuleService extends Service $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] = array_merge($vars, ['change' => []]); - foreach ($service->scanDirectory($this->_getModulePath($name) . 'change/', [], 'md') as $file) { + foreach ($service->scanDirectory($this->_getModulePath($name) . 'change', [], 'md') as $file) { $data[$name]['change'][pathinfo($file, PATHINFO_FILENAME)] = Parsedown::instance()->parse(file_get_contents($file)); } } @@ -164,7 +164,7 @@ class ModuleService extends Service $data = $this->app->cache->get('moduleAllowRule', []); if (is_array($data) && count($data) > 0) return $data; $data = ['config', 'public/static']; - foreach (array_keys($this->getModules()) as $name) $data[] = "app/{$name}"; + foreach (array_keys($this->getModules()) as $name) $data[] = 'app/' . $name; $this->app->cache->set('moduleAllowRule', $data, 30); return $data; } diff --git a/vendor/zoujingli/think-library/src/service/NodeService.php b/vendor/zoujingli/think-library/src/service/NodeService.php index 933d19afd..3f208bd50 100644 --- a/vendor/zoujingli/think-library/src/service/NodeService.php +++ b/vendor/zoujingli/think-library/src/service/NodeService.php @@ -143,14 +143,13 @@ class NodeService extends Service */ public function scanDirectory($path, $data = [], $ext = 'php') { - if (file_exists($path) && is_dir($path)) { - 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) || pathinfo($realpath, 4) === $ext)) { - $data[] = strtr($realpath, '\\', '/'); - } + if (file_exists($path)) if (is_file($path)) $data[] = $path; + elseif (is_dir($path)) 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) || pathinfo($realpath, 4) === $ext)) { + $data[] = strtr($realpath, '\\', '/'); } } return $data;