Formatting
This commit is contained in:
parent
dbd7c5e90b
commit
2ca1f33e68
@ -683,14 +683,22 @@ class Importer
|
||||
// Decide which state they will be in accordance with v7
|
||||
if ($state === $phpvms_classic_states['ACTIVE']) {
|
||||
return UserState::ACTIVE;
|
||||
} elseif ($state === $phpvms_classic_states['INACTIVE']) {
|
||||
}
|
||||
|
||||
if ($state === $phpvms_classic_states['INACTIVE']) {
|
||||
// TODO: Make an inactive state?
|
||||
return UserState::REJECTED;
|
||||
} elseif ($state === $phpvms_classic_states['BANNED']) {
|
||||
}
|
||||
|
||||
if ($state === $phpvms_classic_states['BANNED']) {
|
||||
return UserState::SUSPENDED;
|
||||
} elseif ($state === $phpvms_classic_states['ON_LEAVE']) {
|
||||
}
|
||||
|
||||
if ($state === $phpvms_classic_states['ON_LEAVE']) {
|
||||
return UserState::ON_LEAVE;
|
||||
}
|
||||
|
||||
$this->error('Unknown status: '.$state);
|
||||
return UserState::ACTIVE;
|
||||
}
|
||||
}
|
||||
|
@ -59,9 +59,13 @@ class LoginController extends Controller
|
||||
// Redirect to one of the error pages
|
||||
if ($user->state === UserState::PENDING) {
|
||||
return view('auth.pending');
|
||||
} elseif ($user->state === UserState::REJECTED) {
|
||||
}
|
||||
|
||||
if ($user->state === UserState::REJECTED) {
|
||||
return view('auth.rejected');
|
||||
} elseif ($user->state === UserState::SUSPENDED) {
|
||||
}
|
||||
|
||||
if ($user->state === UserState::SUSPENDED) {
|
||||
return view('auth.suspended');
|
||||
}
|
||||
}
|
||||
|
@ -113,7 +113,9 @@ class GeoService extends Service
|
||||
|
||||
if ($size === 0) {
|
||||
continue;
|
||||
} elseif ($size === 1) {
|
||||
}
|
||||
|
||||
if ($size === 1) {
|
||||
$point = $points[0];
|
||||
Log::debug('name: '.$point->id.' - '.$point->lat.'x'.$point->lon);
|
||||
$coords[] = $point;
|
||||
|
@ -276,23 +276,28 @@ class PirepService extends Service
|
||||
if ($pirep->state === PirepState::PENDING) {
|
||||
if ($new_state === PirepState::ACCEPTED) {
|
||||
return $this->accept($pirep);
|
||||
} elseif ($new_state === PirepState::REJECTED) {
|
||||
}
|
||||
|
||||
if ($new_state === PirepState::REJECTED) {
|
||||
return $this->reject($pirep);
|
||||
}
|
||||
|
||||
return $pirep;
|
||||
} /*
|
||||
}
|
||||
|
||||
/*
|
||||
* Move from a ACCEPTED to REJECTED status
|
||||
*/
|
||||
elseif ($pirep->state === PirepState::ACCEPTED) {
|
||||
if ($pirep->state === PirepState::ACCEPTED) {
|
||||
$pirep = $this->reject($pirep);
|
||||
|
||||
return $pirep;
|
||||
} /*
|
||||
}
|
||||
|
||||
/*
|
||||
* Move from REJECTED to ACCEPTED
|
||||
*/
|
||||
elseif ($pirep->state === PirepState::REJECTED) {
|
||||
if ($pirep->state === PirepState::REJECTED) {
|
||||
$pirep = $this->accept($pirep);
|
||||
|
||||
return $pirep;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user