Code Duplication    Length = 12-14 lines in 2 locations

web_interface/astpp/application/modules/package/controllers/package.php 1 location

@@ 259-272 (lines=14) @@
256
		array_to_csv($outbound_array, 'Usage_Report_' . date("Y-m-d") . '.csv');
257
    
258
	}
259
	function package_pattern_json($package_id){
260
		$json_data = array();
261
		$where = array('package_id' => $package_id);
262
263
		$count_all = $this->db_model->countQuery("*", "package_patterns", $where);
264
		$paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']);
265
		$json_data = $paging_data["json_paging"];
266
267
		$pattern_data = $this->db_model->select("*", "package_patterns", $where, "id", "ASC", $paging_data["paging"]["page_no"], $paging_data["paging"]["start"]);
268
		$grid_fields = json_decode($this->package_form->build_pattern_list_for_customer($package_id));
269
		$json_data['rows'] = $this->form->build_grid($pattern_data, $grid_fields);
270
271
		echo json_encode($json_data);
272
	}
273
    
274
	function package_patterns_add($packageid) {
275
		$data['username'] = $this->session->userdata('user_name');

web_interface/astpp/application/modules/user/controllers/user.php 1 location

@@ 1364-1375 (lines=12) @@
1361
		$this->load->view('view_user_animap', $data);
1362
	}
1363
1364
	function user_animap_list_json() {
1365
		$account_data = $this->session->userdata("accountinfo");
1366
		$json_data = array();
1367
		$where = array("accountid" => $account_data['id']);
1368
		$count_all = $this->db_model->countQuery("*", "ani_map", $where);
1369
		$paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']);
1370
		$json_data = $paging_data["json_paging"];
1371
		$query = $this->db_model->select("*", "ani_map", $where, "id", "ASC", $paging_data["paging"]["page_no"], $paging_data["paging"]["start"]);
1372
		$grid_fields = json_decode($this->user_form->build_user_animap());
1373
		$json_data['rows'] = $this->form->build_grid($query, $grid_fields);
1374
		echo json_encode($json_data);
1375
	}
1376
1377
	function user_animap_action($action, $aniid = "") {
1378
		$add_array = $this->input->post();