Installer fixes
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Admin;
|
|||||||
|
|
||||||
use Auth;
|
use Auth;
|
||||||
use Flash;
|
use Flash;
|
||||||
|
use Log;
|
||||||
use Version;
|
use Version;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
@@ -36,11 +37,16 @@ class DashboardController extends BaseController
|
|||||||
*/
|
*/
|
||||||
protected function checkNewVersion()
|
protected function checkNewVersion()
|
||||||
{
|
{
|
||||||
$current_version = new semver(Version::compact());
|
try {
|
||||||
$latest_version = new semver(Utils::downloadUrl(config('phpvms.version_file')));
|
$current_version = new semver(Version::compact());
|
||||||
|
$latest_version = new semver(Utils::downloadUrl(config('phpvms.version_file')));
|
||||||
|
|
||||||
if(semver::gt($latest_version, $current_version)) {
|
if (semver::gt($latest_version, $current_version)) {
|
||||||
Flash::warning('New version '.$latest_version.' is available!');
|
Flash::warning('New version ' . $latest_version . ' is available!');
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Log::error($e->getMessage());
|
||||||
|
Flash::warning('Could not contact phpVMS for version check');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Services;
|
namespace App\Services;
|
||||||
|
|
||||||
use DB;
|
use DB;
|
||||||
|
use Log;
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
use Irazasyed\LaravelGAMP\Facades\GAMP;
|
use Irazasyed\LaravelGAMP\Facades\GAMP;
|
||||||
@@ -32,7 +33,11 @@ class AnalyticsService
|
|||||||
AnalyticsDimensions::DATABASE_VERSION
|
AnalyticsDimensions::DATABASE_VERSION
|
||||||
);
|
);
|
||||||
|
|
||||||
$gamp->sendPageview();
|
try {
|
||||||
|
$gamp->sendPageview();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Log::error($e->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ class UserService extends BaseService
|
|||||||
|
|
||||||
# If their current rank is one they were assigned, then
|
# If their current rank is one they were assigned, then
|
||||||
# don't change away from it automatically.
|
# don't change away from it automatically.
|
||||||
if($user->rank->auto_promote === false) {
|
if($user->rank && $user->rank->auto_promote === false) {
|
||||||
return $user;
|
return $user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,11 @@
|
|||||||
<div style="float: left; position: absolute; display:block; top: 0px;font-size: 150px">
|
<div style="float: left; position: absolute; display:block; top: 0px;font-size: 150px">
|
||||||
<i class="fa fa-location-arrow" style="opacity: .1;"></i>
|
<i class="fa fa-location-arrow" style="opacity: .1;"></i>
|
||||||
</div>
|
</div>
|
||||||
<h4 class="">{!! $user->current_airport->icao !!}</h4>
|
@if($user->current_airport)
|
||||||
|
<h4 class="">{!! $user->current_airport->icao !!}</h4>
|
||||||
|
@else
|
||||||
|
<h4 class="">-</h4>
|
||||||
|
@endif
|
||||||
<h5 class="description" style="color: white;">current airport</h5>
|
<h5 class="description" style="color: white;">current airport</h5>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -29,7 +29,13 @@
|
|||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center">{!! $user->airline->icao !!}</td>
|
<td class="text-center">{!! $user->airline->icao !!}</td>
|
||||||
<td class="text-center">{!! $user->curr_airport_id !!}</td>
|
<td class="text-center">
|
||||||
|
@if($user->current_airport)
|
||||||
|
{!! $user->curr_airport_id !!}
|
||||||
|
@else
|
||||||
|
-
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
<td align="center">{!! $user->flights !!}</td>
|
<td align="center">{!! $user->flights !!}</td>
|
||||||
<td align="center">{!! \App\Facades\Utils::minutesToTimeString($user->flight_time) !!}</td>
|
<td align="center">{!! \App\Facades\Utils::minutesToTimeString($user->flight_time) !!}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user