This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 
<?php
defined('C5_EXECUTE') or die("Access Denied.");

class Concrete5_Controller_Dashboard_System_Environment_Debug extends DashboardBaseController {
    
    public function view() {
        
        $debug_level = Config::get('SITE_DEBUG_LEVEL');
        $this->set('debug_level', $debug_level);        
    }
    
    public function update_debug() {
        if ($this->token->validate("update_debug")) {
            if ($this->isPost()) {
                Config::save('SITE_DEBUG_LEVEL', $this->post('debug_level'));
                $this->redirect('/dashboard/system/environment/debug', 'debug_saved');

            }
        } else {
            $this->set('error', array($this->token->getErrorMessage()));
        }
    }
    
    public function debug_saved(){
        $this->set('message', t('Debug configuration saved.')); 
        $this->view();
    }
        
}