From cfcd94cf963b07ae6f269e9f5397dfb481740ab8 Mon Sep 17 00:00:00 2001 From: Devil Date: Sat, 24 Jul 2021 22:25:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 +++-- app/admin/controller/Sqlconsole.php | 4 ++-- app/service/PluginsAdminService.php | 8 ++++---- app/service/{bak.php => SqlConsoleService.php} | 2 +- app/service/SystemUpgradeService.php | 4 ++-- example.env | 1 + 6 files changed, 13 insertions(+), 11 deletions(-) rename app/service/{bak.php => SqlConsoleService.php} (98%) create mode 100644 example.env diff --git a/.gitignore b/.gitignore index 6e8e9f3bf..ec22ed4ee 100755 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,10 @@ .DS_Store .ide *.log -.env +*.lock .tea .idea -.htaccess +.env +*.htaccess *payment_*_respond.php *payment_*_notify.php \ No newline at end of file diff --git a/app/admin/controller/Sqlconsole.php b/app/admin/controller/Sqlconsole.php index 1623490bf..3f41e4d2f 100755 --- a/app/admin/controller/Sqlconsole.php +++ b/app/admin/controller/Sqlconsole.php @@ -10,7 +10,7 @@ // +---------------------------------------------------------------------- namespace app\admin\controller; -use app\service\SqlconsoleService; +use app\service\SqlConsoleService; /** * sql控制台 @@ -68,7 +68,7 @@ class Sqlconsole extends Common } // 开始处理 - return SqlconsoleService::Implement($this->data_request); + return SqlConsoleService::Implement($this->data_request); } } ?> \ No newline at end of file diff --git a/app/service/PluginsAdminService.php b/app/service/PluginsAdminService.php index 0a2722648..6ce0993f1 100755 --- a/app/service/PluginsAdminService.php +++ b/app/service/PluginsAdminService.php @@ -13,7 +13,7 @@ namespace app\service; use think\facade\Db; use app\service\PluginsService; use app\service\ResourcesService; -use app\service\SqlconsoleService; +use app\service\SqlConsoleService; /** * 应用管理服务层 @@ -436,7 +436,7 @@ class PluginsAdminService $uninstall_sql = APP_PATH.'plugins'.DS.$plugins.DS.'uninstall.sql'; if(file_exists($uninstall_sql)) { - SqlconsoleService::Implement(['sql'=>file_get_contents($uninstall_sql)]); + SqlConsoleService::Implement(['sql'=>file_get_contents($uninstall_sql)]); } } @@ -1033,7 +1033,7 @@ php; $install_sql = APP_PATH.'plugins'.DS.$plugins.DS.'install.sql'; if(!empty($plugins) && file_exists($install_sql)) { - SqlconsoleService::Implement(['sql'=>file_get_contents($install_sql)]); + SqlConsoleService::Implement(['sql'=>file_get_contents($install_sql)]); } // 插件事件回调 @@ -1430,7 +1430,7 @@ php; $sql = file_get_contents($sql_file); if(!empty($sql)) { - SqlconsoleService::Implement(['sql'=>$sql]); + SqlConsoleService::Implement(['sql'=>$sql]); } } diff --git a/app/service/bak.php b/app/service/SqlConsoleService.php similarity index 98% rename from app/service/bak.php rename to app/service/SqlConsoleService.php index 8c10f4503..7a1e396e4 100755 --- a/app/service/bak.php +++ b/app/service/SqlConsoleService.php @@ -19,7 +19,7 @@ use think\facade\Db; * @version 0.0.1 * @datetime 2016-12-01T21:51:08+0800 */ -class SqlconsoleService +class SqlConsoleService { /** * SQL执行 diff --git a/app/service/SystemUpgradeService.php b/app/service/SystemUpgradeService.php index ccac3fde2..59fc0be90 100644 --- a/app/service/SystemUpgradeService.php +++ b/app/service/SystemUpgradeService.php @@ -10,7 +10,7 @@ // +---------------------------------------------------------------------- namespace app\service; -use app\service\SqlconsoleService; +use app\service\SqlConsoleService; /** * 系统更新服务层 @@ -164,7 +164,7 @@ class SystemUpgradeService $file_content = zip_entry_read($temp_resource, $file_size); if(!empty($file_content)) { - SqlconsoleService::Implement(['sql'=>$file_content]); + SqlConsoleService::Implement(['sql'=>$file_content]); } // 关闭目录项 diff --git a/example.env b/example.env new file mode 100644 index 000000000..6971d8318 --- /dev/null +++ b/example.env @@ -0,0 +1 @@ +APP_DEBUG = true \ No newline at end of file