L5.4 fixes

This commit is contained in:
Hillel Coren 2018-02-26 11:52:34 +02:00
parent 7ed70f0473
commit 0ac9054fed
5 changed files with 9 additions and 9 deletions

View File

@ -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}";

View File

@ -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()) {

View File

@ -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();

View File

@ -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 {

View File

@ -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()) {