import v1.0.0-RC4 | 2009-05-20
This commit is contained in:
35
modules/default/controllers/MaintenancemodeController.php
Normal file
35
modules/default/controllers/MaintenancemodeController.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2005-2009 Keyboard Monkeys Ltd. http://www.kb-m.com
|
||||
* @license http://creativecommons.org/licenses/BSD/ BSD License
|
||||
* @author Keyboard Monkey Ltd
|
||||
* @since CommunityID 0.9
|
||||
* @package CommunityID
|
||||
* @packager Keyboard Monkeys
|
||||
*/
|
||||
|
||||
class MaintenancemodeController extends Monkeys_Controller_Action
|
||||
{
|
||||
private $_settings;
|
||||
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
$this->_settings = new Settings();
|
||||
}
|
||||
|
||||
public function enableAction()
|
||||
{
|
||||
$this->_settings->set(Settings::MAINTENANCE_MODE, 1);
|
||||
|
||||
$this->_redirect('');
|
||||
}
|
||||
|
||||
public function disableAction()
|
||||
{
|
||||
$this->_settings->set(Settings::MAINTENANCE_MODE, 0);
|
||||
|
||||
$this->_redirect('');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user