Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
style(fix/typo): fix typo about word 'multi' from word 'muti'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhilip committed Jul 24, 2019
1 parent 837ba64 commit 8821b08
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- **Tracker:** Add `retry in` field when failed
- **UserInfo:** Add Cache Lock of user access_{time,ip} update
- **ban:** Add table `ban_usernames` and `ban_emails`
- **system:** can get more system info via class SystemInfoHelper

### Fix
- **Cookies:** Fix session sep from `%` to `_`
Expand Down
2 changes: 1 addition & 1 deletion apps/controllers/TrackerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ private function checkSession($queries, $seeder, $userInfo, $torrentInfo)
"tid" => $torrentInfo["id"]
])->queryScalar();

// Ban one torrent seeding/leech at muti-location due to your site config
// Ban one torrent seeding/leech at multi-location due to your site config
if ($seeder == 'yes') { // if this peer's role is seeder
if ($selfCount >= (config('tracker.user_max_seed')))
throw new TrackerException(160, [":count" => config('tracker.user_max_seed')]);
Expand Down
14 changes: 7 additions & 7 deletions apps/models/Torrent.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,23 +199,23 @@ public function getDownloadDict($encode = true)
* which discuss about multitracker behaviour on common bittorrent client ( Chinese Version )
*/
if ($multi_trackers = config("base.site_multi_tracker_url")) {
// Add our main tracker into muti_tracker_list to avoid lost....
// Add our main tracker into multi_tracker_list to avoid lost....
$multi_trackers = config("base.site_tracker_url") . "," . $multi_trackers;
$muti_trackers_list = explode(",", $multi_trackers);
$muti_trackers_list = array_unique($muti_trackers_list); // use array_unique to remove dupe tracker
$multi_trackers_list = explode(",", $multi_trackers);
$multi_trackers_list = array_unique($multi_trackers_list); // use array_unique to remove dupe tracker
// fulfill each tracker with scheme and suffix about user identity
$muti_trackers_list = array_map(function ($uri) use ($scheme, $announce_suffix) {
$multi_trackers_list = array_map(function ($uri) use ($scheme, $announce_suffix) {
return $scheme . $uri . $announce_suffix;
}, $muti_trackers_list);
}, $multi_trackers_list);

if (config('base.site_multi_tracker_behaviour') == 'separate') {
/** d['announce-list'] = [ [tracker1], [backup1], [backup2] ] */
foreach ($muti_trackers_list as $tracker) { // separate each tracker to different tier
foreach ($multi_trackers_list as $tracker) { // separate each tracker to different tier
$dict["announce-list"][] = [$tracker]; // Make each tracker as tier
}
} else { // config('base.site_multi_tracker_behaviour') == 'union'
/** d['announce-list'] = [[ tracker1, tracker2, tracker3 ]] */
$dict["announce-list"][] = $muti_trackers_list;
$dict["announce-list"][] = $multi_trackers_list;
}
}

Expand Down
2 changes: 1 addition & 1 deletion framework/Redis/BaseRedisConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public function typeof($key): ?string
}
}

public function mutiDelete($pattern) {
public function multiDelete($pattern) {
return $this->del($this->keys($pattern));
}

Expand Down

0 comments on commit 8821b08

Please sign in to comment.