mirror of
https://github.com/v2board/v2board.git
synced 2024-11-13 11:09:11 +08:00
update: fix reset day show
This commit is contained in:
parent
c3a74e6610
commit
870e82e155
@ -195,10 +195,14 @@ class UserController extends Controller
|
|||||||
$today = date('d');
|
$today = date('d');
|
||||||
$lastDay = date('d', strtotime('last day of +0 months'));
|
$lastDay = date('d', strtotime('last day of +0 months'));
|
||||||
|
|
||||||
if ((int)config('v2board.reset_traffic_method') === 0) {
|
if ((int)config('v2board.reset_traffic_method') === 0 ||
|
||||||
|
(isset($user->plan->reset_traffic_method) && $user->plan->reset_traffic_method === 0))
|
||||||
|
{
|
||||||
return $lastDay - $today;
|
return $lastDay - $today;
|
||||||
}
|
}
|
||||||
if ((int)config('v2board.reset_traffic_method') === 1) {
|
if ((int)config('v2board.reset_traffic_method') === 1 ||
|
||||||
|
(isset($user->plan->reset_traffic_method) && $user->plan->reset_traffic_method === 1))
|
||||||
|
{
|
||||||
if ((int)$day >= (int)$today && (int)$day >= (int)$lastDay) {
|
if ((int)$day >= (int)$today && (int)$day >= (int)$lastDay) {
|
||||||
return $lastDay - $today;
|
return $lastDay - $today;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user