diff --git a/app/filters.php b/app/filters.php index 259bf2160740..1fc113a940b7 100755 --- a/app/filters.php +++ b/app/filters.php @@ -86,8 +86,7 @@ App::before(function($request) if ($productId == PRODUCT_INVOICE_DESIGNS) { - //$data = file_get_contents("http://ninja.dev/claim_license?license_key={$licenseKey}&product_id={$productId}"); - $data = file_get_contents(NINJA_URL . "/claim_license?license_key={$licenseKey}&product_id={$productId}"); + $data = file_get_contents((Utils::isNinjaDev() ? 'http://ninja.dev' : NINJA_URL) . "/claim_license?license_key={$licenseKey}&product_id={$productId}"); if ($data = json_decode($data)) { @@ -100,6 +99,10 @@ App::before(function($request) $design->save(); } + if (!Utils::isNinja()) { + Cache::forget('invoice_designs_cache_' . Auth::user()->maxInvoiceDesignId()); + } + Session::flash('message', trans('texts.bought_designs')); } } diff --git a/app/routes.php b/app/routes.php index c37b46cc0960..c5514a3ef300 100755 --- a/app/routes.php +++ b/app/routes.php @@ -244,7 +244,7 @@ define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h'); define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET); define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}'); define('NINJA_URL', 'https://www.invoiceninja.com'); -define('NINJA_VERSION', '1.5.0'); +define('NINJA_VERSION', '1.5.1'); define('RELEASES_URL', 'https://github.com/hillelcoren/invoice-ninja/releases/'); define('COUNT_FREE_DESIGNS', 4); diff --git a/app/views/invoices/pdf.blade.php b/app/views/invoices/pdf.blade.php index a78304ae3b47..d711b1a964d2 100644 --- a/app/views/invoices/pdf.blade.php +++ b/app/views/invoices/pdf.blade.php @@ -34,7 +34,7 @@