Skip to content

Commit

Permalink
Improve the offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyCyborg committed Apr 23, 2017
1 parent 085154b commit a342b61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down Expand Up @@ -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');
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Foundation/Console/DownCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
Expand Down
4 changes: 2 additions & 2 deletions src/Foundation/Console/UpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
Expand Down

0 comments on commit a342b61

Please sign in to comment.