mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for invitation resolution
This commit is contained in:
parent
5e955567b1
commit
820ca43020
@ -122,7 +122,7 @@ class TypeCheck extends Command
|
||||
$client->save();
|
||||
});
|
||||
|
||||
Company::cursor()->each(function ($company) {
|
||||
Company::query()->cursor()->each(function ($company) {
|
||||
$this->logMessage("Checking company {$company->id}");
|
||||
$company->saveSettings($company->settings, $company);
|
||||
});
|
||||
|
@ -53,7 +53,7 @@ class QuoteController extends Controller
|
||||
{
|
||||
/* If the quote is expired, convert the status here */
|
||||
|
||||
$invitation = $quote->invitations()->where('client_contact_id', auth()->user()->id)->first();
|
||||
$invitation = $quote->invitations()->where('client_contact_id', auth()->guard('contact')->user()->id)->first();
|
||||
|
||||
$data = [
|
||||
'quote' => $quote,
|
||||
|
@ -53,7 +53,7 @@ class SelfUpdateController extends BaseController
|
||||
|
||||
nlog('Test filesystem is writable');
|
||||
|
||||
// $this->testWritable();
|
||||
$this->testWritable();
|
||||
|
||||
nlog('Clear cache directory');
|
||||
|
||||
@ -61,12 +61,22 @@ class SelfUpdateController extends BaseController
|
||||
|
||||
nlog('copying release file');
|
||||
|
||||
if (copy($this->getDownloadUrl(), storage_path("app/{$this->filename}"))) {
|
||||
nlog('Copied file from URL');
|
||||
} else {
|
||||
$file_headers = @get_headers($this->getDownloadUrl());
|
||||
|
||||
if (stripos($file_headers[0], "404 Not Found") >0 || (stripos($file_headers[0], "302 Found") > 0 && stripos($file_headers[7], "404 Not Found") > 0)) {
|
||||
return response()->json(['message' => 'Download not yet available. Please try again shortly.'], 410);
|
||||
}
|
||||
|
||||
try {
|
||||
if (copy($this->getDownloadUrl(), storage_path("app/{$this->filename}"))) {
|
||||
nlog('Copied file from URL');
|
||||
}
|
||||
}
|
||||
catch(\Exception $e) {
|
||||
nlog($e->getMessage());
|
||||
return response()->json(['message' => 'File exists on the server, however there was a problem downloading and copying to the local filesystem'], 500);
|
||||
}
|
||||
|
||||
nlog('Finished copying');
|
||||
|
||||
$file = Storage::disk('local')->path($this->filename);
|
||||
|
@ -7,13 +7,13 @@ parameters:
|
||||
- 'app/'
|
||||
excludePaths:
|
||||
- 'vendor/'
|
||||
- 'resources/views/*'
|
||||
- 'app/Jobs/Ninja/*'
|
||||
- 'app/Models/Presenters/*'
|
||||
- 'app/Console/Commands/*'
|
||||
- 'app/DataMapper/Analytics/*'
|
||||
- 'app/PaymentDrivers/Authorize/*'
|
||||
- 'app/Utils/Traits/*'
|
||||
- 'resources/views/*'
|
||||
universalObjectCratesClasses:
|
||||
- App\DataMapper\Tax\RuleInterface
|
||||
- App\DataMapper\FeesAndLimits
|
||||
|
Loading…
x
Reference in New Issue
Block a user