Merge fixes

This commit is contained in:
Hillel Coren 2017-06-20 21:35:01 +03:00
parent 30397bb0fa
commit 52ece5de9f
3 changed files with 6 additions and 4 deletions

View File

@ -39,7 +39,7 @@ class LookupUser extends LookupModel
->firstOrFail(); ->firstOrFail();
$lookupUser->email = $user->email; $lookupUser->email = $user->email;
$lookupUser->confirmation_code = $user->confirmation_code; $lookupUser->confirmation_code = $user->confirmation_code ?: null;
$lookupUser->oauth_user_key = ($user->oauth_provider_id && $user->oauth_user_id) ? ($user->oauth_provider_id . '-' . $user->oauth_user_id) : null; $lookupUser->oauth_user_key = ($user->oauth_provider_id && $user->oauth_user_id) ? ($user->oauth_provider_id . '-' . $user->oauth_user_id) : null;
$lookupUser->referral_code = $user->referral_code; $lookupUser->referral_code = $user->referral_code;
$lookupUser->save(); $lookupUser->save();

View File

@ -117,12 +117,14 @@
try { try {
return getPDFString(refreshPDFCB, force); return getPDFString(refreshPDFCB, force);
} catch (exception) { } catch (exception) {
console.warn('Failed to generate PDF'); console.warn('Failed to generate PDF: %s', exception.message);
var href = location.href; var href = location.href;
if (href.indexOf('/view/') > 0 && href.indexOf('phantomjs') == -1) { if (href.indexOf('/view/') > 0 && href.indexOf('phantomjs') == -1) {
var url = href.replace('/view/', '/download/') + '?base64=true'; var url = href.replace('/view/', '/download/') + '?base64=true';
$.get(url, function(result) { $.get(url, function(result) {
if (result && result.indexOf('data:application/pdf') == 0) {
refreshPDFCB(result); refreshPDFCB(result);
}
}) })
} }
} }

View File

@ -202,7 +202,7 @@
<p>&nbsp;<br/>&nbsp;</p> <p>&nbsp;<br/>&nbsp;</p>
@endif @endif
@if ($accountGateway->isGateway(GATEWAY_WEPAY) && $account->token_billing_type_id === TOKEN_BILLING_DISABLED) @if ($accountGateway->isGateway(GATEWAY_WEPAY) && $account->token_billing_type_id == TOKEN_BILLING_DISABLED)
{{--- do nothing ---}} {{--- do nothing ---}}
@else @else
<div class="row"> <div class="row">