mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Bug fixes
This commit is contained in:
parent
c3d43ab480
commit
521fc107f1
@ -859,8 +859,10 @@ class AccountController extends BaseController
|
||||
$mimeType = $file->getMimeType();
|
||||
|
||||
if ($mimeType == 'image/jpeg') {
|
||||
$path = 'logo/' . $account->account_key . '.jpg';
|
||||
$file->move('logo/', $account->account_key . '.jpg');
|
||||
} else if ($mimeType == 'image/png') {
|
||||
$path = 'logo/' . $account->account_key . '.png';
|
||||
$file->move('logo/', $account->account_key . '.png');
|
||||
} else {
|
||||
if (extension_loaded('fileinfo')) {
|
||||
@ -868,12 +870,20 @@ class AccountController extends BaseController
|
||||
$image->resize(200, 120, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
});
|
||||
$path = 'logo/'.$account->account_key.'.jpg';
|
||||
Image::canvas($image->width(), $image->height(), '#FFFFFF')
|
||||
->insert($image)->save('logo/'.$account->account_key.'.jpg');
|
||||
->insert($image)->save($path);
|
||||
} else {
|
||||
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());
|
||||
|
@ -90,9 +90,9 @@ class AuthController extends Controller {
|
||||
|
||||
$users = false;
|
||||
// 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);
|
||||
Session::flash('warning', trans('texts.associated_accounts'));
|
||||
Session::flash('message', trans('texts.associated_accounts'));
|
||||
// check if other accounts are linked
|
||||
} else {
|
||||
$users = $this->accountRepo->loadAccounts(Auth::user()->id);
|
||||
|
@ -104,6 +104,7 @@ function GetPdfMake(invoice, javascript, callback) {
|
||||
doc.save = function(fileName) {
|
||||
this.download(fileName);
|
||||
};
|
||||
|
||||
return doc;
|
||||
}
|
||||
|
||||
|
@ -87,6 +87,7 @@
|
||||
->large()->submit()->block() !!}</p>
|
||||
|
||||
@if (Input::get('new_company') && Utils::allowNewAccounts())
|
||||
{!! Former::hidden('link_accounts')->value('true') !!}
|
||||
<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/>
|
||||
@elseif (Utils::isOAuthEnabled())
|
||||
|
Loading…
Reference in New Issue
Block a user