From 37257cf5ea054a0c6d2abecce0b6ab007fe71007 Mon Sep 17 00:00:00 2001 From: muneebkashif Date: Tue, 19 Jan 2021 17:58:48 +0500 Subject: [PATCH] Group 17 BSCS17037 - Updated lines Line # [3212, 3219, 3243, 3287, 3311, 3364, 3389] --- application/controllers/map.php | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/application/controllers/map.php b/application/controllers/map.php index d4b7485..5f7510e 100644 --- a/application/controllers/map.php +++ b/application/controllers/map.php @@ -3209,14 +3209,17 @@ public function mapviewframe($slug) { } else { $view_list = array(); foreach ($forms_list as $final_view) { - $view_list = array_merge($view_list, array($final_view['form_name'] => $final_view['form_id'])); + $view_list = array_merge($view_list, + array($final_view['form_name'] => $final_view['form_id'])); } $view_list = array_flip($view_list); $data['form_lists'] = $view_list; $data['form_list_selected'] = array_flip($view_list); $first_form_id = $forms_list[0]['form_id']; $data['form_id'] = $first_form_id; - $total_result = $this->form_results_model->get_form_results_count_for_map_ajax($forms_list, $to_date = '', $from_date = '', $town_filter = ''); + $total_result = $this->form_results_model + ->get_form_results_count_for_map_ajax($forms_list, $to_date = '', + $from_date = '', $town_filter = ''); $totalPages = ceil($total_result / $this->perMap); $data['totalPages'] = $totalPages; $selected_form = $this->form_model->get_form($first_form_id); @@ -3240,7 +3243,8 @@ public function mapviewframe($slug) { * for categry listing */ $record_array_final_filter = array(); - $results_filer = $this->form_results_model->get_form_results_filters($forms_list); + $results_filer = $this->form_results_model + ->get_form_results_filters($forms_list); $town_array = array(); $uc_array = array(); $filter_exist_array = array(); @@ -3284,7 +3288,8 @@ public function mapviewframe($slug) { $exist_alpha[$first_char] = '1'; $pin_name = $first_char . '1'; } - $pin_exist_for_cat = array_merge($pin_exist_for_cat, array($valueforarray => $pin_name)); + $pin_exist_for_cat = array_merge($pin_exist_for_cat, + array($valueforarray => $pin_name)); } else { if (array_key_exists($valueforarray, $pin_exist_for_cat)) { $pin_name = $pin_exist_for_cat[$valueforarray]; @@ -3308,7 +3313,8 @@ public function mapviewframe($slug) { } $record_array = array_merge($record_array, array('image' => $imagess)); } - $record_array = array_merge($record_array, array('location' => $v['location'])); + $record_array = array_merge($record_array, + array('location' => $v['location'])); $record_array = array_merge($record_array, array('id' => $v['id'])); $record_array = array_merge($record_array, array('created_datetime' => $date)); if (!empty($v['location'])) { @@ -3328,7 +3334,9 @@ public function mapviewframe($slug) { * its call back function call */ foreach ($filter_attribute as $filter_attribute_value) { - uasort($record_array_final_filter, array(new SortAssociativeArray($filter_attribute_value), "call")); + uasort($record_array_final_filter, + array(new SortAssociativeArray($filter_attribute_value), + "call")); } $record_array_final = array(); $results = $this->form_results_model->get_form_results_ajax($forms_list); @@ -3361,7 +3369,9 @@ public function mapviewframe($slug) { $exist_alpha[$first_char] = '1'; $pin_name = $first_char . '1'; } - $pin_exist_for_cat = array_merge($pin_exist_for_cat, array($valueforarray => $pin_name)); + $pin_exist_for_cat = array_merge($pin_exist_for_cat, + array($valueforarray + => $pin_name)); } else { if (array_key_exists($valueforarray, $pin_exist_for_cat)) { $pin_name = $pin_exist_for_cat[$valueforarray]; @@ -3394,7 +3404,8 @@ public function mapviewframe($slug) { } } $data['selected_form'] = $first_form_id; - $data['locations'] = $this->getMapHtmlInfo($record_array_final, $heading_array, $filter_attribute); + $data['locations'] = $this->getMapHtmlInfo($record_array_final, + $heading_array, $filter_attribute); $town_lists = $this->app_users_model->get_towns($selected_form['app_id']); $town_list_array = array(); foreach ($town_lists as $towns) { @@ -3702,4 +3713,4 @@ function term_meta_cmp($b, $a, $attr) { } } -} \ No newline at end of file +}