mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for claiming white label license
This commit is contained in:
parent
1276aa19bf
commit
74d0973978
@ -14,6 +14,7 @@ use Schema;
|
|||||||
use App\Models\Language;
|
use App\Models\Language;
|
||||||
use App\Models\InvoiceDesign;
|
use App\Models\InvoiceDesign;
|
||||||
use App\Events\UserSettingsChanged;
|
use App\Events\UserSettingsChanged;
|
||||||
|
use App\Libraries\CurlUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class StartupCheck
|
* Class StartupCheck
|
||||||
@ -71,7 +72,7 @@ class StartupCheck
|
|||||||
if (Utils::isNinja()) {
|
if (Utils::isNinja()) {
|
||||||
$data = Utils::getNewsFeedResponse();
|
$data = Utils::getNewsFeedResponse();
|
||||||
} else {
|
} else {
|
||||||
$file = @file_get_contents(NINJA_APP_URL.'/news_feed/'.Utils::getUserType().'/'.NINJA_VERSION);
|
$file = @CurlUtils::get(NINJA_APP_URL.'/news_feed/'.Utils::getUserType().'/'.NINJA_VERSION);
|
||||||
$data = @json_decode($file);
|
$data = @json_decode($file);
|
||||||
}
|
}
|
||||||
if ($data) {
|
if ($data) {
|
||||||
@ -128,7 +129,7 @@ class StartupCheck
|
|||||||
$productId = Input::get('product_id');
|
$productId = Input::get('product_id');
|
||||||
|
|
||||||
$url = (Utils::isNinjaDev() ? SITE_URL : NINJA_APP_URL) . "/claim_license?license_key={$licenseKey}&product_id={$productId}&get_date=true";
|
$url = (Utils::isNinjaDev() ? SITE_URL : NINJA_APP_URL) . "/claim_license?license_key={$licenseKey}&product_id={$productId}&get_date=true";
|
||||||
$data = trim(file_get_contents($url));
|
$data = trim(CurlUtils::get($url));
|
||||||
|
|
||||||
if ($productId == PRODUCT_INVOICE_DESIGNS) {
|
if ($productId == PRODUCT_INVOICE_DESIGNS) {
|
||||||
if ($data = json_decode($data)) {
|
if ($data = json_decode($data)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user