From c4697a7d89c3f380667a827b116049bf2639eccf Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Tue, 8 Feb 2022 17:01:39 +0800 Subject: [PATCH] settings add hr options --- include/functions.php | 2 +- nexus/Install/Install.php | 4 ++-- nexus/Install/settings.default.php | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/functions.php b/include/functions.php index 475ec560..0f47d593 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2489,7 +2489,7 @@ else { Torrents seeding Torrents leeching   - H&R: %s/%s]', get_row_count('hit_and_runs', "where uid = {$CURUSER['id']} and status = 3"), get_setting('hr.ban_user_when_counts_reach'))?> + H&R: %s/%s]', get_row_count('hit_and_runs', "where uid = {$CURUSER['id']} and status = 3"), get_setting('hr.ban_user_when_counts_reach'))?> = UC_SYSOP) { ?> [] diff --git a/nexus/Install/Install.php b/nexus/Install/Install.php index 92d3bb49..b5f0b4c8 100644 --- a/nexus/Install/Install.php +++ b/nexus/Install/Install.php @@ -542,7 +542,7 @@ class Install public function runMigrate() { if (!WITH_LARAVEL) { - throw new \RuntimeException('Laravel is not avaliable.'); + throw new \RuntimeException('Laravel is not available.'); } $command = "php " . ROOT_PATH . "artisan migrate --force"; $result = exec($command, $output, $result_code); @@ -558,7 +558,7 @@ class Install public function runDatabaseSeeder() { if (!WITH_LARAVEL) { - throw new \RuntimeException('Laravel is not avaliable.'); + throw new \RuntimeException('Laravel is not available.'); } $command = "php " . ROOT_PATH . "artisan db:seed"; $result = exec($command, $output, $result_code); diff --git a/nexus/Install/settings.default.php b/nexus/Install/settings.default.php index dd4aaa07..ad8ebc09 100644 --- a/nexus/Install/settings.default.php +++ b/nexus/Install/settings.default.php @@ -1,5 +1,10 @@ array ( 'SITENAME' => 'NexusPHP', @@ -164,6 +169,7 @@ 'againstoffer' => '1', 'userbar' => '2', 'view_special_torrent' => '4', + 'torrent_hr' => User::CLASS_ADMINISTRATOR, ), 'tweak' => array ( @@ -215,6 +221,7 @@ 'taxpercentage' => '10', 'prolinkpoint' => '1', 'prolinktime' => '600', + 'cancel_hr' => BonusLogs::DEFAULT_BONUS_CANCEL_ONE_HIT_AND_RUN, ), 'account' => array ( @@ -374,4 +381,11 @@ 'google_drive_refresh_token' => '', 'google_drive_folder_id' => '', ), + 'hr' => [ + 'mode' => HitAndRun::MODE_DISABLED, + 'inspect_time' => '', + 'seed_time_minimum' => '', + 'ignore_when_ratio_reach' => '', + 'ban_user_when_counts_reach' => '', + ], );