Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #348 from mattythebatty/maintenanceCommands
Browse files Browse the repository at this point in the history
Add commands to put the store into and out of maintenance mode
  • Loading branch information
denisdulici committed Feb 4, 2016
2 parents 8657e0e + ec79863 commit b56e010
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions system/library/command/down.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Command;

class Down extends Command {

protected $name = 'down';

protected $description = 'Put the store into maintenance mode';

public function fire()
{
$this->loadAdminModel('setting/setting');

$this->admin->model_setting_setting->editSettingValue('config', 'config_maintenance', 1);

$this->info('Maintenance mode enabled');
}

}
20 changes: 20 additions & 0 deletions system/library/command/up.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Command;

class Up extends Command {

protected $name = 'up';

protected $description = 'Take the store out of maintenance mode';

public function fire()
{
$this->loadAdminModel('setting/setting');

$this->admin->model_setting_setting->editSettingValue('config', 'config_maintenance', 0);

$this->info('Maintenance mode disabled');
}

}

0 comments on commit b56e010

Please sign in to comment.