Installer fixes
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Admin;
|
||||
|
||||
use Auth;
|
||||
use Flash;
|
||||
use Log;
|
||||
use Version;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -36,11 +37,16 @@ class DashboardController extends BaseController
|
||||
*/
|
||||
protected function checkNewVersion()
|
||||
{
|
||||
$current_version = new semver(Version::compact());
|
||||
$latest_version = new semver(Utils::downloadUrl(config('phpvms.version_file')));
|
||||
try {
|
||||
$current_version = new semver(Version::compact());
|
||||
$latest_version = new semver(Utils::downloadUrl(config('phpvms.version_file')));
|
||||
|
||||
if(semver::gt($latest_version, $current_version)) {
|
||||
Flash::warning('New version '.$latest_version.' is available!');
|
||||
if (semver::gt($latest_version, $current_version)) {
|
||||
Flash::warning('New version ' . $latest_version . ' is available!');
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
Log::error($e->getMessage());
|
||||
Flash::warning('Could not contact phpVMS for version check');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user