From 3fc8c72d1bea8edb765634a2a53f3db9a6fb13f7 Mon Sep 17 00:00:00 2001 From: net909 Date: Sat, 21 Dec 2024 23:29:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DFTP=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/deploy/ftp.php | 2 +- app/lib/deploy/opanel.php | 2 +- app/lib/dns/cloudflare.php | 5 +++-- app/middleware/ViewOutput.php | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/lib/deploy/ftp.php b/app/lib/deploy/ftp.php index fd0d3b8..2503d2d 100644 --- a/app/lib/deploy/ftp.php +++ b/app/lib/deploy/ftp.php @@ -38,7 +38,7 @@ class ftp implements DeployInterface fclose($temp_stream); $temp_stream = fopen('php://temp', 'r+'); - fwrite($temp_stream, $fullchain); + fwrite($temp_stream, $privatekey); rewind($temp_stream); if (ftp_fput($conn_id, $config['pem_key_file'], $temp_stream, FTP_BINARY)) { $this->log('私钥文件上传成功:' . $config['pem_key_file']); diff --git a/app/lib/deploy/opanel.php b/app/lib/deploy/opanel.php index 31dca1a..f7ad2b8 100644 --- a/app/lib/deploy/opanel.php +++ b/app/lib/deploy/opanel.php @@ -90,7 +90,7 @@ class opanel implements DeployInterface { $url = $this->url . $path; - $timestamp = getMillisecond(); + $timestamp = time().''; $token = md5('1panel' . $this->key . $timestamp); $headers = [ '1Panel-Token: '.$token, diff --git a/app/lib/dns/cloudflare.php b/app/lib/dns/cloudflare.php index 92690bf..be82b6a 100644 --- a/app/lib/dns/cloudflare.php +++ b/app/lib/dns/cloudflare.php @@ -59,12 +59,13 @@ class cloudflare implements DnsInterface //获取解析记录列表 public function getDomainRecords($PageNumber = 1, $PageSize = 20, $KeyWord = null, $SubDomain = null, $Value = null, $Type = null, $Line = null, $Status = null) { + if (!isNullOrEmpty($Value)) $KeyWord = $Value; + $param = ['type' => $Type, 'search' => $KeyWord, 'page' => $PageNumber, 'per_page' => $PageSize]; if (!isNullOrEmpty($SubDomain)) { if ($SubDomain == '@') $SubDomain = $this->domain; else $SubDomain .= '.' . $this->domain; + $param['name'] = $SubDomain; } - if (!isNullOrEmpty($Value)) $KeyWord = $Value; - $param = ['name' => $SubDomain, 'type' => $Type, 'search' => $KeyWord, 'page' => $PageNumber, 'per_page' => $PageSize]; if (!isNullOrEmpty($Line)) { $param['proxied'] = $Line == '1' ? 'true' : 'false'; } diff --git a/app/middleware/ViewOutput.php b/app/middleware/ViewOutput.php index 46faaff..2703a6a 100644 --- a/app/middleware/ViewOutput.php +++ b/app/middleware/ViewOutput.php @@ -19,7 +19,7 @@ class ViewOutput { View::assign('islogin', $request->islogin); View::assign('user', $request->user); - View::assign('cdnpublic', 'https://cdnjs.webstatic.cn/ajax/libs/'); + View::assign('cdnpublic', 'https://s4.zstatic.net/ajax/libs/'); View::assign('skin', getAdminSkin()); return $next($request); }