From a342b61a7c34a37ac677b9090cafd20c4b32d3dd Mon Sep 17 00:00:00 2001 From: Virgil-Adrian Teaca Date: Mon, 24 Apr 2017 01:09:45 +0300 Subject: [PATCH] Improve the offline mode --- src/Foundation/Application.php | 4 ++-- src/Foundation/Console/DownCommand.php | 4 ++-- src/Foundation/Console/UpCommand.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Foundation/Application.php b/src/Foundation/Application.php index 6ec49755..7f8a474a 100644 --- a/src/Foundation/Application.php +++ b/src/Foundation/Application.php @@ -37,7 +37,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn * * @var string */ - const VERSION = '3.77.30'; + const VERSION = '3.77.31'; /** * Indicates if the application has "booted". @@ -865,7 +865,7 @@ public function readyForResponses() */ public function isDownForMaintenance() { - return file_exists($this['config']['app.manifest'] .'/down'); + return file_exists($this['path.storage'] .DS .'down'); } /** diff --git a/src/Foundation/Console/DownCommand.php b/src/Foundation/Console/DownCommand.php index 494e6fad..cab5af97 100644 --- a/src/Foundation/Console/DownCommand.php +++ b/src/Foundation/Console/DownCommand.php @@ -28,9 +28,9 @@ class DownCommand extends Command */ public function fire() { - $config = $this->nova['config']; + $basePath = $this->nova['path.storage']; - touch($config['path.storage'] .DS .'down'); + touch($basePath .DS .'down'); $this->comment('Application is now in maintenance mode.'); } diff --git a/src/Foundation/Console/UpCommand.php b/src/Foundation/Console/UpCommand.php index 27795edf..ad4b5793 100644 --- a/src/Foundation/Console/UpCommand.php +++ b/src/Foundation/Console/UpCommand.php @@ -28,9 +28,9 @@ class UpCommand extends Command */ public function fire() { - $config = $this->nova['config']; + $basePath = $this->nova['path.storage']; - @unlink($config['path.storage'] .DS .'down'); + @unlink($basePath .DS .'down'); $this->info('Application is now live.'); }