优化插件安装和检测安装

This commit is contained in:
tao 2022-01-12 16:10:25 +08:00
parent 4042239db9
commit 160dc08cc0
7 changed files with 10 additions and 11 deletions

View File

@ -12,7 +12,7 @@ use taoler\com\Files;
use taoler\com\Api; use taoler\com\Api;
use app\common\lib\SetConf; use app\common\lib\SetConf;
use think\App; use think\App;
use app\common\lib\ZipFile; use app\common\lib\Zip;
class Addons extends AdminController class Addons extends AdminController
{ {
@ -214,7 +214,7 @@ class Addons extends AdminController
return json(['code'=>-1,'msg'=>'下载升级文件失败']); return json(['code'=>-1,'msg'=>'下载升级文件失败']);
} }
$uzip = new ZipFile(); $uzip = new Zip();
$zipDir = strstr($package_file, '.zip',true); //返回文件名后缀前的字符串 $zipDir = strstr($package_file, '.zip',true); //返回文件名后缀前的字符串
$zipPath = Files::getDirPath($zipDir); //转换为带/的路径 压缩文件解压到的路径 $zipPath = Files::getDirPath($zipDir); //转换为带/的路径 压缩文件解压到的路径
$unzip_res = $uzip->unzip($package_file,$zipPath,true); $unzip_res = $uzip->unzip($package_file,$zipPath,true);

View File

@ -12,9 +12,8 @@ class Index extends BaseController
// 检测是否安装过 // 检测是否安装过
protected function initialize(){ protected function initialize(){
if(file_exists('./install.lock')){ if(file_exists('./install.lock')){
//echo "<script>alert('已经成功安装了TaoLer社区系统安装系统已锁定。如需重新安装请删除根目录下的install.lock文件')</script>"; echo "<script>alert('已经成功安装了TaoLer社区系统安装系统已锁定。如需重新安装请删除根目录下的install.lock文件')</script>";
//die(); die();
return response("<script>alert('已经成功安装了TaoLer社区系统安装系统已锁定。如需重新安装请删除根目录下的install.lock文件')</script>");
} }
} }

View File

@ -54,7 +54,7 @@ class Auth
} }
// 排除公共权限 // 排除公共权限
$not_check = ['admin/','admin/login/index','admin/index/index','admin/index/home','admin/Admin/info','admin/Admin/repass','admin/Admin/logout','admin/Index/news','admin/Index/cunsult','admin/Index/replys','admin/Index/reply','admin/captcha','addons/socail/']; $not_check = ['admin/','admin/login/index','admin/index/index','admin/index/home','admin/Admin/info','admin/Admin/repass','admin/Admin/logout','admin/Index/news','admin/Index/cunsult','admin/Index/replys','admin/Index/reply','admin/captcha','addons/socail/','admin/addons/social/oauth/login','admin/addons/bacimg/index/getImages'];
if (!in_array($path, $not_check)) { if (!in_array($path, $not_check)) {
$auth = new UserAuth(); $auth = new UserAuth();

View File

@ -7,7 +7,7 @@ return [
//应用名,此项不可更改 //应用名,此项不可更改
'appname' => 'TaoLer', 'appname' => 'TaoLer',
//版本配置 //版本配置
'version' => '1.8.20', 'version' => '1.8.21',
//加盐 //加盐
'salt' => 'taoler', 'salt' => 'taoler',
//数据库备份目录 //数据库备份目录

View File

@ -26,7 +26,7 @@ class Files
$arr = array(); $arr = array();
$data = scandir($path); $data = scandir($path);
foreach ($data as $value){ foreach ($data as $value){
if($value !='.' && $value != '..' && !stripos($value,".")){ if($value !='.' && $value != '..' && !stripos($value,".") && $value != '.gitignore'){
$arr[] = strtolower($value); $arr[] = strtolower($value);
} }
} }

View File

@ -5,7 +5,7 @@
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => '83ca563d1c45da13aef6d32918bfb64b5cc2a935', 'reference' => '3e8741aae6a9a6de29bf9a55d5c22e9cf86f922c',
'name' => 'taoser/taoler', 'name' => 'taoser/taoler',
'dev' => true, 'dev' => true,
), ),
@ -151,7 +151,7 @@
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => '83ca563d1c45da13aef6d32918bfb64b5cc2a935', 'reference' => '3e8741aae6a9a6de29bf9a55d5c22e9cf86f922c',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'taoser/think-addons' => array( 'taoser/think-addons' => array(

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php <?php
// This file is automatically generated at:2022-01-07 14:45:18 // This file is automatically generated at:2022-01-08 13:48:32
declare (strict_types = 1); declare (strict_types = 1);
return array ( return array (
0 => 'taoser\\addons\\Service', 0 => 'taoser\\addons\\Service',