From a7616960f01f1019ecf2fe041a06af0d67a5e697 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 3 Aug 2016 15:56:14 +1000 Subject: [PATCH] Removed direct references to and --- classes/lnApp/Auth/ORM.php | 2 +- classes/lnApp/Controller/Login.php | 2 +- classes/lnApp/Controller/User/Account.php | 2 +- classes/lnApp/Table.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/lnApp/Auth/ORM.php b/classes/lnApp/Auth/ORM.php index 085e121..468186e 100644 --- a/classes/lnApp/Auth/ORM.php +++ b/classes/lnApp/Auth/ORM.php @@ -121,7 +121,7 @@ abstract class lnApp_Auth_ORM extends Kohana_Auth_ORM { $uo = parent::get_user($default); // If we are not logged in, see if there is token for the user - if (is_null($uo) AND $tokenuser AND ($token=Session::instance()->get('token')) OR (! empty($_REQUEST['token']) AND $token=$_REQUEST['token'])) + if (is_null($uo) AND $tokenuser AND ($token=Session::instance()->get('token')) OR ($token=Arr::get($_REQUEST,'token'))) $uo = $this->_get_token_user($token); return $uo; diff --git a/classes/lnApp/Controller/Login.php b/classes/lnApp/Controller/Login.php index e718ff4..ede570a 100644 --- a/classes/lnApp/Controller/Login.php +++ b/classes/lnApp/Controller/Login.php @@ -111,7 +111,7 @@ abstract class lnApp_Controller_Login extends Controller_TemplateDefault { if (Auth::instance()->logged_in()) HTTP::redirect(URL::link('user','welcome/index')); - // If there is a post and $_POST is not empty + // If there is a post if ($this->request->post()) { // If the post data validates using the rules setup in the user model if (Auth::instance()->login($this->request->post('username'),$this->request->post('password'))) { diff --git a/classes/lnApp/Controller/User/Account.php b/classes/lnApp/Controller/User/Account.php index f1dc7c0..95f8d54 100644 --- a/classes/lnApp/Controller/User/Account.php +++ b/classes/lnApp/Controller/User/Account.php @@ -21,7 +21,7 @@ abstract class lnApp_Controller_User_Account extends Controller_Account { * Enable User to Edit their Account Details */ public function action_edit() { - if ($_POST AND $this->ao->values($_POST)->changed() AND (! $this->save($this->ao))) + if ($this->request->post() AND $this->ao->values($this->request->post())->changed() AND (! $this->save($this->ao))) $this->ao->reload(); Block::factory() diff --git a/classes/lnApp/Table.php b/classes/lnApp/Table.php index 7698aea..cd9284f 100644 --- a/classes/lnApp/Table.php +++ b/classes/lnApp/Table.php @@ -315,7 +315,7 @@ $(document).ready(function() { // We have preference for parameters passed to the action. if (is_null($id = Request::current()->param('id'))) { // First save our POST id data into the session, so we dont need it when going to each page - if (isset($_POST['id']) AND is_array($_POST['id'])) + if (is_array($this->request->post('id'))) Session::instance()->set('page_table_view'.$key,'id'); if ($ids = Session::instance()->get('page_table_view'.$key)) {