diff --git a/app/Repositories/TorrentRepository.php b/app/Repositories/TorrentRepository.php index 03964cc7..5e3d10d0 100644 --- a/app/Repositories/TorrentRepository.php +++ b/app/Repositories/TorrentRepository.php @@ -315,6 +315,7 @@ class TorrentRepository extends BaseRepository ->where('uid', $uid) ->whereIn('torrent_id', [0, $id]) ->orderBy('torrent_id', 'desc') + ->orderBy('id', 'desc') ->first(); if ($secret) { return $secret->secret; diff --git a/nexus/Install/Install.php b/nexus/Install/Install.php index 4939b283..b0b450a3 100644 --- a/nexus/Install/Install.php +++ b/nexus/Install/Install.php @@ -67,7 +67,7 @@ class Install public function getLogFile() { - return sprintf('%s/nexus-install-%s.log', sys_get_temp_dir(), date('YmdHis')); + return sprintf('%s/nexus-install-%s.log', sys_get_temp_dir(), date('Ymd')); } public function getInsallDirectory() diff --git a/nexus/Install/Update.php b/nexus/Install/Update.php index f7c0a915..8e19ed14 100644 --- a/nexus/Install/Update.php +++ b/nexus/Install/Update.php @@ -14,7 +14,7 @@ class Update extends Install public function getLogFile() { - return sprintf('%s/nexus-update-%s.log', sys_get_temp_dir(), date('YmdHis')); + return sprintf('%s/nexus-update-%s.log', sys_get_temp_dir(), date('Ymd')); } public function getUpdateDirectory() diff --git a/nexus/Install/install/install.php b/nexus/Install/install/install.php index 1bd0ad9c..c14aac82 100644 --- a/nexus/Install/install/install.php +++ b/nexus/Install/install/install.php @@ -15,6 +15,7 @@ if (!$install->canAccessStep($currentStep)) { $install->gotoStep(1); } $error = $copy = ''; +$pass = true; //step 1 if ($currentStep == 1) { @@ -60,7 +61,6 @@ if ($currentStep == 2) { } if ($currentStep == 3) { - $pass = true; $shouldCreateTable = $install->listShouldCreateTable(); while ($isPost) { try { @@ -136,7 +136,6 @@ if ($currentStep == 5) { $error = $exception->getMessage(); } } - $pass = true; $userFormControls = [ ['label' => '用户名', 'name' => 'username', 'value' => $_POST['username'] ?? ''], ['label' => '邮箱', 'name' => 'email', 'value' => $_POST['email'] ?? ''], diff --git a/nexus/Install/update/update.php b/nexus/Install/update/update.php index 882f9a43..e1d35b73 100644 --- a/nexus/Install/update/update.php +++ b/nexus/Install/update/update.php @@ -22,6 +22,7 @@ if (!$update->canAccessStep($currentStep)) { $update->gotoStep(1); } $error = $copy = ''; +$pass = true; //step 1 if ($currentStep == 1) { @@ -67,7 +68,6 @@ if ($currentStep == 2) { } if ($currentStep == 3) { - $pass = true; $createTables = $update->listAllTableCreate(); $existsTables = $update->listExistsTable(); $tableRows = [];