Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2022-07-01 11:26:46 -07:00
commit 9670ca3b8a

View file

@ -110,12 +110,7 @@ class AcceptanceController extends Controller
Storage::makeDirectory('private_uploads/signatures', 775); Storage::makeDirectory('private_uploads/signatures', 775);
} }
/**
* Check for the eula-pdfs directory
*/
if (! Storage::exists('private_uploads/eula-pdfs')) {
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
}
$item = $acceptance->checkoutable_type::find($acceptance->checkoutable_id); $item = $acceptance->checkoutable_type::find($acceptance->checkoutable_id);
$display_model = ''; $display_model = '';
@ -126,6 +121,20 @@ class AcceptanceController extends Controller
if ($request->input('asset_acceptance') == 'accepted') { if ($request->input('asset_acceptance') == 'accepted') {
/**
* Check for the eula-pdfs directory
*/
if (! Storage::exists('private_uploads/eula-pdfs')) {
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
}
if (Setting::getSettings()->require_accept_signature == '1') {
// Check if the signature directory exists, if not create it
if (!Storage::exists('private_uploads/signatures')) {
Storage::makeDirectory('private_uploads/signatures', 775);
}
// The item was accepted, check for a signature // The item was accepted, check for a signature
if ($request->filled('signature_output')) { if ($request->filled('signature_output')) {
$sig_filename = 'siglog-' . Str::uuid() . '-' . date('Y-m-d-his') . '.png'; $sig_filename = 'siglog-' . Str::uuid() . '-' . date('Y-m-d-his') . '.png';
@ -138,7 +147,7 @@ class AcceptanceController extends Controller
// This mostly only applies to users on super-duper crapola browsers *cough* IE *cough* // This mostly only applies to users on super-duper crapola browsers *cough* IE *cough*
} else { } else {
return redirect()->back()->with('error', trans('general.shitty_browser')); return redirect()->back()->with('error', trans('general.shitty_browser'));
}
} }