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 
<?php

defined('C5_EXECUTE') or die("Access Denied.");
class Concrete5_Controller_Dashboard_System_Basics_SiteName extends DashboardBaseController {

    public function view() {
        $this->set('site', h(SITE));
    }

    public function sitename_saved() {
        $this->set('message', t("Your site's name has been saved."));
        $this->view();
    }

    public function update_sitename() {
        if ($this->token->validate("update_sitename")) {
            if ($this->isPost()) {
                Config::save('SITE', h($this->post('SITE')));
                $this->redirect('/dashboard/system/basics/site_name','sitename_saved');
            }
        } else {
            $this->set('error', array($this->token->getErrorMessage()));
        }
    }


}