Added some default ORM/URL functions and theme/login fixes

This commit is contained in:
Deon George
2014-02-13 14:10:20 +11:00
parent 319b4b29db
commit 7a78a9a7d6
6 changed files with 229 additions and 1 deletions

View File

@@ -40,7 +40,11 @@ class lnApp_Controller_Login extends Controller_TemplateDefault {
}
}
$oauthlogin = is_null($x=Session::instance()->get_once('login-no-oauth',NULL)) ? TRUE : ! $x;
if (array_key_exists('oauth',Kohana::modules()))
$oauthlogin = is_null($x=Session::instance()->get_once('login-no-oauth',NULL)) ? TRUE : ! $x;
else
$oauthlogin = FALSE;
$output .= View::factory('pages/login')
->set('oauth',$oauthlogin);

View File

@@ -35,6 +35,13 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa
*/
protected $secure_actions = array();
public function __construct(Request $request, Response $response) {
if (Config::theme())
$this->template = Config::theme().'/page';
return parent::__construct($request,$response);
}
/**
* Check and see if this controller needs authentication
*