Optimised Company() Setup() Config() and changed method_directory into URL

This commit is contained in:
Deon George
2013-02-12 22:14:59 +11:00
parent 97d894d472
commit 288d974cfa
63 changed files with 422 additions and 346 deletions

View File

@@ -18,7 +18,7 @@ class lnApp_Controller_Login extends Controller_TemplateDefault {
// If user already signed-in
if (Auth::instance()->logged_in()!= 0) {
// Redirect to the user account
HTTP::redirect('user/welcome/index');
HTTP::redirect(URL::link('user','welcome/index'));
}
// If there is a post and $_POST is not empty
@@ -35,7 +35,7 @@ class lnApp_Controller_Login extends Controller_TemplateDefault {
HTTP::redirect($redir);
} else
HTTP::redirect('user/welcome/index');
HTTP::redirect(URL::link('user','welcome/index'));
} else {
// We are not successful logging in, so delete our session data

View File

@@ -166,7 +166,7 @@ abstract class lnApp_Controller_TemplateDefault extends Controller_Template {
$this->template->title = '';
// Language
$this->meta->language = Config::instance()->so->language->iso;
$this->meta->language = Config::language();
// Description
$this->meta->description = sprintf('%s::%s',$this->request->controller(),$this->request->action());
@@ -243,7 +243,7 @@ abstract class lnApp_Controller_TemplateDefault extends Controller_Template {
}
public function _footer() {
return sprintf('© %s',Config::SiteName());
return sprintf('© %s',Config::sitename());
}
/**

View File

@@ -108,7 +108,7 @@ $(function () {
'attr'=>array('id'=>sprintf('B_%s',$branch['id'])),
'state'=>$branch['state'],
'data'=>array('title'=>$branch['name']),
'attr'=>array('id'=>sprintf('N_%s',$branch['id']),'href'=>empty($branch['attr_href']) ? URL::site(sprintf('user/%s/menu',$branch['name'])) : $branch['attr_href']),
'attr'=>array('id'=>sprintf('N_%s',$branch['id']),'href'=>empty($branch['attr_href']) ? URL::link('user',$branch['name'].'/menu',TRUE) : $branch['attr_href']),
)
);
}