From 5c7a15ff838c1bb92681b563a63685fccbceb451 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 5 Jun 2016 19:10:15 +0300 Subject: [PATCH] Minor fixes --- app/Http/routes.php | 3 +++ app/Ninja/Repositories/ReferralRepository.php | 6 +++--- resources/lang/en/texts.php | 5 ++++- resources/views/master.blade.php | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/Http/routes.php b/app/Http/routes.php index d31991e577ad..c42049ff369b 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -325,6 +325,9 @@ Route::get('/compare-online-invoicing{sites?}', function() { Route::get('/forgot', function() { return Redirect::to(NINJA_APP_URL.'/recover_password', 301); }); +Route::get('/feed', function() { + return Redirect::to(NINJA_WEB_URL.'/feed', 301); +}); if (!defined('CONTACT_EMAIL')) { diff --git a/app/Ninja/Repositories/ReferralRepository.php b/app/Ninja/Repositories/ReferralRepository.php index f96475c72ddc..f6170af296e3 100644 --- a/app/Ninja/Repositories/ReferralRepository.php +++ b/app/Ninja/Repositories/ReferralRepository.php @@ -7,7 +7,7 @@ class ReferralRepository { public function getCounts($userId) { - $accounts = Account::where('referral_user_id', $userId); + $accounts = Account::where('referral_user_id', $userId)->get(); $counts = [ 'free' => 0, @@ -18,7 +18,7 @@ class ReferralRepository foreach ($accounts as $account) { $counts['free']++; $plan = $account->getPlanDetails(false, false); - + if ($plan) { $counts['pro']++; if ($plan['plan'] == PLAN_ENTERPRISE) { @@ -29,4 +29,4 @@ class ReferralRepository return $counts; } -} \ No newline at end of file +} diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 093601aa7660..41d4af2a6021 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -1334,7 +1334,7 @@ $LANG = array( 'auto_bill_payment_method_paypal' => 'your PayPal account (:email)', 'auto_bill_notification_placeholder' => 'This invoice will automatically be billed to your Visa card ending in 4242 on the due date.', 'payment_settings' => 'Payment Settings', - + 'on_send_date' => 'On send date', 'on_due_date' => 'On due date', 'auto_bill_ach_date_help' => 'ACH auto bill will always happen on the due date', @@ -1348,6 +1348,9 @@ $LANG = array( 'payment_settings_supported_gateways' => 'These options are supported by the WePay, Stripe, and Braintree gateways.', 'ach_email_prompt' => 'Please enter your email address:', 'verification_pending' => 'Verification Pending', + + 'update_font_cache' => 'Please force refresh the page to update the font cache.', + ); return $LANG; diff --git a/resources/views/master.blade.php b/resources/views/master.blade.php index c0f95e70323b..db5e8f366519 100644 --- a/resources/views/master.blade.php +++ b/resources/views/master.blade.php @@ -48,7 +48,7 @@ } if (errorMsg.indexOf('No unicode cmap for font') > -1) { - alert("Please force refresh the page to update the font cache.\n\n - Windows: Ctrl + F5\n - Mac/Apple: Apple + R or Command + R\n - Linux: F5"); + alert("{{ trans('texts.update_font_cache') }}\n\n - Windows: Ctrl + F5\n - Mac/Apple: Apple + R or Command + R\n - Linux: F5"); } try {