diff --git a/resources/views/maintenance.blade.php b/resources/views/maintenance.blade.php index b14995a..e2991a8 100644 --- a/resources/views/maintenance.blade.php +++ b/resources/views/maintenance.blade.php @@ -1,3 +1,4 @@ +@if($_SERVER['QUERY_STRING'] === '') @include('layouts.lang') @@ -92,6 +93,10 @@ body {

Maintenance Mode

We are performing scheduled site maintenance at this time.

Please check back with us later.

+ @if(auth()->user()->role == 'admin') +
Admin options:
+ Dashboard | Turn off + @endif @@ -99,3 +104,11 @@ body { +@elseif($_SERVER['QUERY_STRING'] === 'maintenance=off') +@php +EnvEditor::editKey('MAINTENANCE_MODE', false); +ob_clean(); +header("Location: " . url('dashboard')); +exit; +@endphp +@endif \ No newline at end of file diff --git a/resources/views/update.blade.php b/resources/views/update.blade.php index 0975e65..05c7bda 100644 --- a/resources/views/update.blade.php +++ b/resources/views/update.blade.php @@ -192,7 +192,7 @@ if(EnvEditor::getKey('APP_DEBUG') == 'false'){ @include('components.finishing') - + - +
Logo diff --git a/routes/web.php b/routes/web.php index d2f97ed..fba7755 100755 --- a/routes/web.php +++ b/routes/web.php @@ -51,7 +51,7 @@ if(file_exists(base_path('INSTALLING')) or file_exists(base_path('INSTALLERLOCK' }else{ // Disables routes if in Maintenance Mode -if(env('MAINTENANCE_MODE') != 'true' and !file_exists(base_path("storage/MAINTENANCE"))){ +if(env('MAINTENANCE_MODE') != 'true'){ //Changes the homepage to a LinkStack profile if set in the config if(config('advanced-config.custom_home_url') != '') { @@ -195,8 +195,7 @@ Route::group([ // Check if new version is available if($updater->source()->isNewVersionAvailable() and (file_exists(base_path("backups/CANUPDATE")) or env('SKIP_UPDATE_BACKUP') == true)) { - $tst = base_path('storage/'); - file_put_contents($tst.'MAINTENANCE', ''); + EnvEditor::editKey('MAINTENANCE_MODE', true); // Get the current installed version echo $updater->source()->getVersionInstalled();