优化插件安装和检测安装
This commit is contained in:
parent
4042239db9
commit
160dc08cc0
@ -12,7 +12,7 @@ use taoler\com\Files;
|
||||
use taoler\com\Api;
|
||||
use app\common\lib\SetConf;
|
||||
use think\App;
|
||||
use app\common\lib\ZipFile;
|
||||
use app\common\lib\Zip;
|
||||
|
||||
class Addons extends AdminController
|
||||
{
|
||||
@ -214,7 +214,7 @@ class Addons extends AdminController
|
||||
return json(['code'=>-1,'msg'=>'下载升级文件失败']);
|
||||
}
|
||||
|
||||
$uzip = new ZipFile();
|
||||
$uzip = new Zip();
|
||||
$zipDir = strstr($package_file, '.zip',true); //返回文件名后缀前的字符串
|
||||
$zipPath = Files::getDirPath($zipDir); //转换为带/的路径 压缩文件解压到的路径
|
||||
$unzip_res = $uzip->unzip($package_file,$zipPath,true);
|
||||
|
@ -12,9 +12,8 @@ class Index extends BaseController
|
||||
// 检测是否安装过
|
||||
protected function initialize(){
|
||||
if(file_exists('./install.lock')){
|
||||
//echo "<script>alert('已经成功安装了TaoLer社区系统,安装系统已锁定。如需重新安装,请删除根目录下的install.lock文件')</script>";
|
||||
//die();
|
||||
return response("<script>alert('已经成功安装了TaoLer社区系统,安装系统已锁定。如需重新安装,请删除根目录下的install.lock文件')</script>");
|
||||
echo "<script>alert('已经成功安装了TaoLer社区系统,安装系统已锁定。如需重新安装,请删除根目录下的install.lock文件')</script>";
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)) {
|
||||
$auth = new UserAuth();
|
||||
|
@ -7,7 +7,7 @@ return [
|
||||
//应用名,此项不可更改
|
||||
'appname' => 'TaoLer',
|
||||
//版本配置
|
||||
'version' => '1.8.20',
|
||||
'version' => '1.8.21',
|
||||
//加盐
|
||||
'salt' => 'taoler',
|
||||
//数据库备份目录
|
||||
|
@ -26,7 +26,7 @@ class Files
|
||||
$arr = array();
|
||||
$data = scandir($path);
|
||||
foreach ($data as $value){
|
||||
if($value !='.' && $value != '..' && !stripos($value,".")){
|
||||
if($value !='.' && $value != '..' && !stripos($value,".") && $value != '.gitignore'){
|
||||
$arr[] = strtolower($value);
|
||||
}
|
||||
}
|
||||
|
4
vendor/composer/installed.php
vendored
4
vendor/composer/installed.php
vendored
@ -5,7 +5,7 @@
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => '83ca563d1c45da13aef6d32918bfb64b5cc2a935',
|
||||
'reference' => '3e8741aae6a9a6de29bf9a55d5c22e9cf86f922c',
|
||||
'name' => 'taoser/taoler',
|
||||
'dev' => true,
|
||||
),
|
||||
@ -151,7 +151,7 @@
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => '83ca563d1c45da13aef6d32918bfb64b5cc2a935',
|
||||
'reference' => '3e8741aae6a9a6de29bf9a55d5c22e9cf86f922c',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'taoser/think-addons' => array(
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?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);
|
||||
return array (
|
||||
0 => 'taoser\\addons\\Service',
|
||||
|
Loading…
x
Reference in New Issue
Block a user