Site setup fixes
This commit is contained in:
47
application/classes/controller/admin/setup.php
Normal file
47
application/classes/controller/admin/setup.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides Siet Configuration Setup
|
||||
*
|
||||
* @package lnApp
|
||||
* @subpackage Page/Setup
|
||||
* @category Controllers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
class Controller_Admin_Setup extends Controller_TemplateDefault_Admin {
|
||||
protected $secure_actions = array(
|
||||
'edit'=>TRUE,
|
||||
);
|
||||
|
||||
/**
|
||||
* View/Update the site configuration
|
||||
*/
|
||||
public function action_edit() {
|
||||
$o = Config::instance()->so;
|
||||
$output = '';
|
||||
|
||||
if ($_POST) {
|
||||
// Entry updated
|
||||
if ($o->values($_POST)->check() AND $o->save())
|
||||
SystemMessage::add(array(
|
||||
'title'=>'Site Configuration Recorded',
|
||||
'type'=>'info',
|
||||
'body'=>'Site Config successfully recorded.',
|
||||
));
|
||||
}
|
||||
|
||||
$output .= Form::open();
|
||||
$output .= View::factory($this->viewpath())
|
||||
->set('o',$o);;
|
||||
$output .= Form::submit('submit','submit',array('class'=>'form_button'));
|
||||
$output .= Form::close();
|
||||
|
||||
Block::add(array(
|
||||
'title'=>_('Update Site Configuration'),
|
||||
'body'=>$output,
|
||||
));
|
||||
}
|
||||
}
|
||||
?>
|
@@ -163,7 +163,7 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
|
||||
$this->meta->language = Config::instance()->so->language_id;
|
||||
|
||||
// Copyright
|
||||
$this->meta->copywrite = Config::instance()->so->site_name;
|
||||
$this->meta->copywrite = Config::sitename();
|
||||
|
||||
// Copyright
|
||||
$this->meta->description = sprintf('%s::%s',$this->request->controller(),$this->request->action());
|
||||
|
Reference in New Issue
Block a user