mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-04 01:09:58 -05:00
fix: carbon issues
This commit is contained in:
@@ -167,13 +167,13 @@ class TorrentController extends BaseController
|
||||
$du_until = $request->input('du_until');
|
||||
|
||||
if (($user->group->is_modo || $user->group->is_internal) && isset($du_until)) {
|
||||
$torrent->du_until = Carbon::now()->addDays($request->input('du_until'));
|
||||
$torrent->du_until = Carbon::now()->addDays($request->integer('du_until'));
|
||||
}
|
||||
$torrent->free = $user->group->is_modo || $user->group->is_internal ? ($request->input('free') ?? 0) : 0;
|
||||
$fl_until = $request->input('fl_until');
|
||||
|
||||
if (($user->group->is_modo || $user->group->is_internal) && isset($fl_until)) {
|
||||
$torrent->fl_until = Carbon::now()->addDays($request->input('fl_until'));
|
||||
$torrent->fl_until = Carbon::now()->addDays($request->integer('fl_until'));
|
||||
}
|
||||
$torrent->sticky = $user->group->is_modo || $user->group->is_internal ? ($request->input('sticky') ?? 0) : 0;
|
||||
$torrent->moderated_at = Carbon::now();
|
||||
|
||||
@@ -102,7 +102,7 @@ class TorrentBuffController extends Controller
|
||||
|
||||
if ($request->freeleech != 0) {
|
||||
if ($request->fl_until !== null) {
|
||||
$torrent->fl_until = Carbon::now()->addDays($request->fl_until);
|
||||
$torrent->fl_until = Carbon::now()->addDays($request->integer('fl_until'));
|
||||
$this->chatRepository->systemMessage(
|
||||
sprintf('Ladies and Gents, [url=%s]%s[/url] has been granted %s%% FreeLeech for '.$request->fl_until.' days.', $torrentUrl, $torrent->name, $request->freeleech)
|
||||
);
|
||||
@@ -212,7 +212,7 @@ class TorrentBuffController extends Controller
|
||||
$du_until = $request->input('du_until');
|
||||
|
||||
if ($du_until !== null) {
|
||||
$torrent->du_until = Carbon::now()->addDays($request->input('du_until'));
|
||||
$torrent->du_until = Carbon::now()->addDays($request->integer('du_until'));
|
||||
$this->chatRepository->systemMessage(
|
||||
sprintf('Ladies and Gents, [url=%s]%s[/url] has been granted Double Upload for '.$request->input('du_until').' days.', $torrentUrl, $torrent->name)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user