dummy flogs for img data : ps

This commit is contained in:
VE10-Sanjeev 2022-11-11 21:30:58 +05:30
parent 8937d697fc
commit 2f271f9e9a

View File

@ -8759,18 +8759,27 @@ class PD_Controller extends REST_Controller
//print_r(($this->existing_imges));die();
//add remaining docs_to_be_collected into final array
if (is_array($docs_to_be_collected) && count($docs_to_be_collected)) {
$j = 0;
foreach ($docs_to_be_collected as $key => $value) {
$final_data[] = array('img_key' => 'docs_to_be_collected', 'img_name' => $value['doc_name'], 'img_url' => "", 'fk_form_id' => "24", 'pd_document_id' => $value['pd_document_id'], 'pd_image_alias_name' => $value['pd_image_alias_name'], 'is_name_editable' => $value['is_name_editable'],'content_type'=>(strtoupper($key) =='VIDEO' ? "2" : "1"));
$final_data[] = array('img_key' => 'docs_to_be_collected', 'img_name' => $value['doc_name'], 'fk_form_id' => "24", 'pd_document_id' => $value['pd_document_id'], 'pd_image_alias_name' => $value['pd_image_alias_name'], 'is_name_editable' => $value['is_name_editable'],'content_type'=>(strtoupper($key) =='VIDEO' ? "2" : "1"));
$final_data[$j][($value[2] ? 'img_data' : 'img_url')] = ($value[2] ? array() : '' );
$j++;
}
}
} else {
$i = 0;
foreach ($this->photo_names as $key => $value) {
$final_data[] = array('img_key' => $key, 'img_name' => $value[0], 'img_url' => "", 'fk_form_id' => $value[1], "is_multiple" => $value[2], 'pd_image_alias_name' => "", 'is_name_editable' => $value[3] ,'content_type'=>(strtoupper($key) =='VIDEO' ? "2" : "1"));
$final_data[] = array('img_key' => $key, 'img_name' => $value[0], 'fk_form_id' => $value[1], "is_multiple" => $value[2], 'pd_image_alias_name' => "", 'is_name_editable' => $value[3] ,'content_type'=>(strtoupper($key) =='VIDEO' ? "2" : "1"));
$final_data[$i][($value[2] ? 'img_data' : 'img_url')] = ($value[2] ? array() : '' );
$i++;
}
if (is_array($docs_to_be_collected) && count($docs_to_be_collected)) {
$k = 0;
foreach ($docs_to_be_collected as $key => $value) {
$final_data[] = array('img_key' => 'docs_to_be_collected', 'img_name' => $value['doc_name'], 'img_url' => "", 'fk_form_id' => "24", "is_multiple" => 0, 'pd_image_alias_name' => "", 'is_name_editable' => 0 ,'content_type'=>(strtoupper($key) =='VIDEO' ? "2" : "1"));
$final_data[] = array('img_key' => 'docs_to_be_collected', 'img_name' => $value['doc_name'], 'fk_form_id' => "24", "is_multiple" => 0, 'pd_image_alias_name' => "", 'is_name_editable' => 0 ,'content_type'=>(strtoupper($key) =='VIDEO' ? "2" : "1"));
$final_data[$k][($value[2] ? 'img_data' : 'img_url')] = ($value[2] ? array() : '' );
$k++;
}
}
}