Code Duplication    Length = 23-24 lines in 2 locations

admin_pages/venues/Venues_Admin_Page.core.php 1 location

@@ 1237-1259 (lines=23) @@
1234
	}
1235
1236
1237
	protected function _category_details($view) {
1238
1239
		//load formatter helper
1240
		EE_Registry::instance()->load_helper( 'Formatter' );
1241
		//load field generator helper
1242
		EE_Registry::instance()->load_helper( 'Form_Fields' );
1243
1244
		$route = $view == 'edit' ? 'update_category' : 'insert_category';
1245
		$this->_set_add_edit_form_tags($route);
1246
1247
		$this->_set_category_object();
1248
		$id = !empty($this->_category->id) ? $this->_category->id : '';
1249
1250
		$delete_action = 'delete_category';
1251
1252
		$redirect = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'category_list' ), $this->_admin_base_url );
1253
1254
		$this->_set_publish_post_box_vars( 'VEN_CAT_ID', $id, $delete_action, $redirect );
1255
1256
		//take care of contents
1257
		$this->_template_args['admin_page_content'] = $this->_category_details_content();
1258
		$this->display_admin_page_with_sidebar();
1259
	}
1260
1261
1262

admin_pages/events/Events_Admin_Page.core.php 1 location

@@ 2127-2150 (lines=24) @@
2124
	}
2125
2126
2127
	protected function _category_details($view) {
2128
2129
		//load formatter helper
2130
		EE_Registry::instance()->load_helper( 'Formatter' );
2131
		//load field generator helper
2132
		EE_Registry::instance()->load_helper( 'Form_Fields' );
2133
2134
		$route = $view == 'edit' ? 'update_category' : 'insert_category';
2135
		$this->_set_add_edit_form_tags($route);
2136
2137
		$this->_set_category_object();
2138
		$id = !empty($this->_category->id) ? $this->_category->id : '';
2139
2140
		$delete_action = 'delete_category';
2141
2142
		//custom redirect
2143
		$redirect = EE_Admin_Page::add_query_args_and_nonce( array('action' => 'category_list'), $this->_admin_base_url );
2144
2145
		$this->_set_publish_post_box_vars( 'EVT_CAT_ID', $id, $delete_action, $redirect );
2146
2147
		//take care of contents
2148
		$this->_template_args['admin_page_content'] = $this->_category_details_content();
2149
		$this->display_admin_page_with_sidebar();
2150
	}
2151
2152
2153