From 0d8bed8b6fa1c7bdfa34ba6b3d2a999e614f53c0 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 1 Nov 2019 19:04:35 +0800 Subject: [PATCH] ComposerUpdate --- app/admin/controller/api/Update.php | 12 ++++-------- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 14 +++++++------- vendor/composer/autoload_static.php | 8 ++++---- vendor/services.php | 2 +- 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/app/admin/controller/api/Update.php b/app/admin/controller/api/Update.php index 67e7756ca..cccf0bde3 100644 --- a/app/admin/controller/api/Update.php +++ b/app/admin/controller/api/Update.php @@ -42,14 +42,10 @@ class Update extends Controller */ public function get($encode) { - $this->file = dirname($this->app->getAppPath()) . '/' . decode($encode); - if (file_exists($this->file)) { - $this->success('读取文件成功!', [ - 'format' => 'base64', 'content' => base64_encode(file_get_contents($this->file)), - ]); - } else { - $this->error('获取文件内容失败!'); - } + $this->file = $this->app->getRootPath() . decode($encode); + file_exists($this->file) ? $this->success('读取文件成功!', [ + 'format' => 'base64', 'content' => base64_encode(file_get_contents($this->file)), + ]) : $this->error('获取文件内容失败!'); } } diff --git a/vendor/autoload.php b/vendor/autoload.php index 53c729d0f..43f4fbcd3 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit04cda99c86e0d1e594810d779a40708c::getLoader(); +return ComposerAutoloaderInitc7690ef5c13b95d953f61a4e48e6692c::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index d5b53cec4..b5f959d93 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit04cda99c86e0d1e594810d779a40708c +class ComposerAutoloaderInitc7690ef5c13b95d953f61a4e48e6692c { private static $loader; @@ -19,15 +19,15 @@ class ComposerAutoloaderInit04cda99c86e0d1e594810d779a40708c return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit04cda99c86e0d1e594810d779a40708c', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitc7690ef5c13b95d953f61a4e48e6692c', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit04cda99c86e0d1e594810d779a40708c', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitc7690ef5c13b95d953f61a4e48e6692c', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit04cda99c86e0d1e594810d779a40708c::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitc7690ef5c13b95d953f61a4e48e6692c::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -48,19 +48,19 @@ class ComposerAutoloaderInit04cda99c86e0d1e594810d779a40708c $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit04cda99c86e0d1e594810d779a40708c::$files; + $includeFiles = Composer\Autoload\ComposerStaticInitc7690ef5c13b95d953f61a4e48e6692c::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire04cda99c86e0d1e594810d779a40708c($fileIdentifier, $file); + composerRequirec7690ef5c13b95d953f61a4e48e6692c($fileIdentifier, $file); } return $loader; } } -function composerRequire04cda99c86e0d1e594810d779a40708c($fileIdentifier, $file) +function composerRequirec7690ef5c13b95d953f61a4e48e6692c($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 76c54557c..8962fe906 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit04cda99c86e0d1e594810d779a40708c +class ComposerStaticInitc7690ef5c13b95d953f61a4e48e6692c { public static $files = array ( '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', @@ -469,9 +469,9 @@ class ComposerStaticInit04cda99c86e0d1e594810d779a40708c public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit04cda99c86e0d1e594810d779a40708c::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit04cda99c86e0d1e594810d779a40708c::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit04cda99c86e0d1e594810d779a40708c::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitc7690ef5c13b95d953f61a4e48e6692c::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitc7690ef5c13b95d953f61a4e48e6692c::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitc7690ef5c13b95d953f61a4e48e6692c::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/services.php b/vendor/services.php index 5afd00890..d569549c0 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\app\\Service',