mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Bug fixes
This commit is contained in:
parent
c3d43ab480
commit
521fc107f1
@ -859,8 +859,10 @@ class AccountController extends BaseController
|
|||||||
$mimeType = $file->getMimeType();
|
$mimeType = $file->getMimeType();
|
||||||
|
|
||||||
if ($mimeType == 'image/jpeg') {
|
if ($mimeType == 'image/jpeg') {
|
||||||
|
$path = 'logo/' . $account->account_key . '.jpg';
|
||||||
$file->move('logo/', $account->account_key . '.jpg');
|
$file->move('logo/', $account->account_key . '.jpg');
|
||||||
} else if ($mimeType == 'image/png') {
|
} else if ($mimeType == 'image/png') {
|
||||||
|
$path = 'logo/' . $account->account_key . '.png';
|
||||||
$file->move('logo/', $account->account_key . '.png');
|
$file->move('logo/', $account->account_key . '.png');
|
||||||
} else {
|
} else {
|
||||||
if (extension_loaded('fileinfo')) {
|
if (extension_loaded('fileinfo')) {
|
||||||
@ -868,12 +870,20 @@ class AccountController extends BaseController
|
|||||||
$image->resize(200, 120, function ($constraint) {
|
$image->resize(200, 120, function ($constraint) {
|
||||||
$constraint->aspectRatio();
|
$constraint->aspectRatio();
|
||||||
});
|
});
|
||||||
|
$path = 'logo/'.$account->account_key.'.jpg';
|
||||||
Image::canvas($image->width(), $image->height(), '#FFFFFF')
|
Image::canvas($image->width(), $image->height(), '#FFFFFF')
|
||||||
->insert($image)->save('logo/'.$account->account_key.'.jpg');
|
->insert($image)->save($path);
|
||||||
} else {
|
} else {
|
||||||
Session::flash('warning', 'Warning: To support gifs the fileinfo PHP extension needs to be enabled.');
|
Session::flash('warning', 'Warning: To support gifs the fileinfo PHP extension needs to be enabled.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make sure image isn't interlaced
|
||||||
|
if (extension_loaded('fileinfo')) {
|
||||||
|
$img = Image::make($path);
|
||||||
|
$img->interlace(false);
|
||||||
|
$img->save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Event::fire(new UserSettingsChanged());
|
Event::fire(new UserSettingsChanged());
|
||||||
|
@ -90,9 +90,9 @@ class AuthController extends Controller {
|
|||||||
|
|
||||||
$users = false;
|
$users = false;
|
||||||
// we're linking a new account
|
// we're linking a new account
|
||||||
if ($userId && Auth::user()->id != $userId) {
|
if ($request->link_accounts && $userId && Auth::user()->id != $userId) {
|
||||||
$users = $this->accountRepo->associateAccounts($userId, Auth::user()->id);
|
$users = $this->accountRepo->associateAccounts($userId, Auth::user()->id);
|
||||||
Session::flash('warning', trans('texts.associated_accounts'));
|
Session::flash('message', trans('texts.associated_accounts'));
|
||||||
// check if other accounts are linked
|
// check if other accounts are linked
|
||||||
} else {
|
} else {
|
||||||
$users = $this->accountRepo->loadAccounts(Auth::user()->id);
|
$users = $this->accountRepo->loadAccounts(Auth::user()->id);
|
||||||
|
@ -104,6 +104,7 @@ function GetPdfMake(invoice, javascript, callback) {
|
|||||||
doc.save = function(fileName) {
|
doc.save = function(fileName) {
|
||||||
this.download(fileName);
|
this.download(fileName);
|
||||||
};
|
};
|
||||||
|
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,6 +87,7 @@
|
|||||||
->large()->submit()->block() !!}</p>
|
->large()->submit()->block() !!}</p>
|
||||||
|
|
||||||
@if (Input::get('new_company') && Utils::allowNewAccounts())
|
@if (Input::get('new_company') && Utils::allowNewAccounts())
|
||||||
|
{!! Former::hidden('link_accounts')->value('true') !!}
|
||||||
<center><p>- {{ trans('texts.or') }} -</p></center>
|
<center><p>- {{ trans('texts.or') }} -</p></center>
|
||||||
<p>{!! Button::primary(trans('texts.new_company'))->asLinkTo(URL::to('/invoice_now?new_company=true&sign_up=true'))->large()->submit()->block() !!}</p><br/>
|
<p>{!! Button::primary(trans('texts.new_company'))->asLinkTo(URL::to('/invoice_now?new_company=true&sign_up=true'))->large()->submit()->block() !!}</p><br/>
|
||||||
@elseif (Utils::isOAuthEnabled())
|
@elseif (Utils::isOAuthEnabled())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user