From 0ac9054fed291156f4f5efb384857b41f40864d9 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 26 Feb 2018 11:52:34 +0200 Subject: [PATCH] L5.4 fixes --- app/Http/Controllers/AccountController.php | 2 +- app/Http/Controllers/HomeController.php | 2 +- app/Http/Controllers/NinjaController.php | 10 +++++----- app/Http/Middleware/ApiCheck.php | 2 +- app/Http/Middleware/StartupCheck.php | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index c86bb1aef975..9361976f37ea 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -1376,7 +1376,7 @@ class AccountController extends BaseController $user->account->startTrial(PLAN_PRO); if (Input::get('go_pro') == 'true') { - Session::set(REQUESTED_PRO_PLAN, true); + session([REQUESTED_PRO_PLAN => true]); } return "{$user->first_name} {$user->last_name}"; diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index e29c173c92b2..6838ca154275 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -67,7 +67,7 @@ class HomeController extends BaseController { // Track the referral/campaign code if (Input::has('rc')) { - Session::set(SESSION_REFERRAL_CODE, Input::get('rc')); + session([SESSION_REFERRAL_CODE => Input::get('rc')]); } if (Auth::check()) { diff --git a/app/Http/Controllers/NinjaController.php b/app/Http/Controllers/NinjaController.php index c74f705f3e1e..c90b45b26c52 100644 --- a/app/Http/Controllers/NinjaController.php +++ b/app/Http/Controllers/NinjaController.php @@ -92,19 +92,19 @@ class NinjaController extends BaseController public function show_license_payment() { if (Input::has('return_url')) { - Session::set('return_url', Input::get('return_url')); + session(['return_url' => Input::get('return_url')]); } if (Input::has('affiliate_key')) { if ($affiliate = Affiliate::where('affiliate_key', '=', Input::get('affiliate_key'))->first()) { - Session::set('affiliate_id', $affiliate->id); + session(['affiliate_id' => $affiliate->id]); } } if (Input::has('product_id')) { - Session::set('product_id', Input::get('product_id')); + session(['product_id' => Input::get('product_id')]); } elseif (! Session::has('product_id')) { - Session::set('product_id', PRODUCT_ONE_CLICK_INSTALL); + session(['product_id' => PRODUCT_ONE_CLICK_INSTALL]); } if (! Session::get('affiliate_id')) { @@ -112,7 +112,7 @@ class NinjaController extends BaseController } if (Utils::isNinjaDev() && Input::has('test_mode')) { - Session::set('test_mode', Input::get('test_mode')); + session(['test_mode' => Input::get('test_mode')]); } $account = $this->accountRepo->getNinjaAccount(); diff --git a/app/Http/Middleware/ApiCheck.php b/app/Http/Middleware/ApiCheck.php index 7bd19386d6ea..cefbd0ea3b5b 100644 --- a/app/Http/Middleware/ApiCheck.php +++ b/app/Http/Middleware/ApiCheck.php @@ -54,7 +54,7 @@ class ApiCheck // check if user is archived if ($token && $token->user) { Auth::onceUsingId($token->user_id); - Session::set('token_id', $token->id); + session(['token_id' => $token->id]); } elseif ($hasApiSecret && $request->is('api/v1/ping')) { // do nothing: allow ping with api_secret or account token } else { diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php index f4cd6e23d864..3a3177d1078d 100644 --- a/app/Http/Middleware/StartupCheck.php +++ b/app/Http/Middleware/StartupCheck.php @@ -142,7 +142,7 @@ class StartupCheck if (Input::has('lang')) { $locale = Input::get('lang'); App::setLocale($locale); - Session::set(SESSION_LOCALE, $locale); + session([SESSION_LOCALE => $locale]); if (Auth::check()) { if ($language = Language::whereLocale($locale)->first()) {