From e3ca731f0c523c0a11b55ed985c2fcf678725ab0 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Sat, 10 Jun 2023 14:58:20 +0530 Subject: [PATCH] Path Issues Fixes : ps --- api/application/controllers/Flyhi_Controller.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/api/application/controllers/Flyhi_Controller.php b/api/application/controllers/Flyhi_Controller.php index 4ed8ca64..ae424237 100644 --- a/api/application/controllers/Flyhi_Controller.php +++ b/api/application/controllers/Flyhi_Controller.php @@ -453,9 +453,7 @@ class Flyhi_Controller extends REST_Controller { else if($flyhipd_data[0]['sales_pd_type'] == 4){$pd_type = "Residence FI PD-";} else $pd_type = "Demo PD-"; - // print_r($flyhipd_data);die();// working fine .. - // if($flyhipd_data) - if(1) + if($flyhipd_data) { ini_set('max_execution_time', 0); $bucket_name = LENDER_BUCKET_NAME_PREFIX.$flyhipd_data[0]['lender_id']; @@ -474,8 +472,7 @@ class Flyhi_Controller extends REST_Controller { $all_section_data = $this->Flyhi_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $pd_id,'isactive' => 1),SALESPD_SECTION_DATA,array(),'','section_id','ASC'); // print_r($all_section_data); - // if(!$flyhipd_data[0]['is_pdf'] || $flyhipd_data[0]['is_edited']) - if(1) + if(!$flyhipd_data[0]['is_pdf'] || $flyhipd_data[0]['is_edited']) { $all_section_data = $this->Flyhi_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $pd_id,'isactive' => 1),SALESPD_SECTION_DATA,array(),'','section_id','ASC'); @@ -494,14 +491,14 @@ class Flyhi_Controller extends REST_Controller { } $view_data['section9'] = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $pd_id,'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS); if($view_data['section9']){ - foreach ($view_data['section9'] as $key => $value){ + foreach ($view_data['section9'] as $inx => $value){ if($value['img_name'] != '' ){ $bucket_name = LENDER_BUCKET_NAME_PREFIX.$flyhipd_data[0]['lender_id']; $img_rand_name = $value['rand_name'] != null ? $value['rand_name'] : $value['img_name'].".png" ; $bucket_key = "sales_pd/".$pd_id."/images/".$img_rand_name; $singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name, $bucket_key,'30 minutes'); $img_url = $value['img'] ? $value['img'] : ($singed_uri ? $singed_uri : ""); - $view_data['section9'][$key]['img'] = $img_url; + $view_data['section9'][$inx]['img'] = $img_url; } } }