FHM31052601IBL - populate decrypt cache sebelum semua BIRT/PDF fetch
- Ibl_patient_decrypt: tambah fetch_birt_pdf() + pre_cache_and_get_url() - Reporturl.php: auto pre-cache sebelum return URL atau fetch PDF - Rv_patient.php: pre_cache sebelum return URL ke frontend - tgram/Hasil.php: fetch_birt_pdf() via dl_report() - Qr_report_uploader.php: populate/delete cache wrapping download_file() - Ibl_merge_report_gateway.php: populate/delete cache wrapping Go merge service call - send_email.php: populate_birt_cache() + delete_birt_cache() untuk email attachment Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -55,20 +55,18 @@ class Reporturl
|
||||
$final_url = str_replace($param_key, $replacement_value, $final_url);
|
||||
}
|
||||
|
||||
// Populate decrypt cache sebelum return URL atau fetch PDF
|
||||
$CI->load->library('ibl_patient_decrypt');
|
||||
$CI->ibl_patient_decrypt->pre_cache_and_get_url($final_url);
|
||||
|
||||
if($show == 'N'){
|
||||
return array(true, $final_url);
|
||||
}
|
||||
else{
|
||||
$final_url = 'http'.($_SERVER['HTTPS'] == 'on' ? 's' : '').'://'.$_SERVER['HTTP_HOST'].$final_url;
|
||||
|
||||
$response = file_get_contents($final_url);
|
||||
$pdf = $CI->ibl_patient_decrypt->fetch_birt_pdf($final_url);
|
||||
header("Content-type: application/pdf");
|
||||
header(
|
||||
'Content-Disposition: inline; filename="' .
|
||||
$output_file_name .
|
||||
'"'
|
||||
);
|
||||
echo ($response);
|
||||
header('Content-Disposition: inline; filename="' . ($output_file_name ?? 'report.pdf') . '"');
|
||||
echo $pdf;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user