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

@@ 2169-2192 (lines=24) @@
2166
	}
2167
2168
2169
	protected function _category_details($view) {
2170
2171
		//load formatter helper
2172
		EE_Registry::instance()->load_helper( 'Formatter' );
2173
		//load field generator helper
2174
		EE_Registry::instance()->load_helper( 'Form_Fields' );
2175
2176
		$route = $view == 'edit' ? 'update_category' : 'insert_category';
2177
		$this->_set_add_edit_form_tags($route);
2178
2179
		$this->_set_category_object();
2180
		$id = !empty($this->_category->id) ? $this->_category->id : '';
2181
2182
		$delete_action = 'delete_category';
2183
2184
		//custom redirect
2185
		$redirect = EE_Admin_Page::add_query_args_and_nonce( array('action' => 'category_list'), $this->_admin_base_url );
2186
2187
		$this->_set_publish_post_box_vars( 'EVT_CAT_ID', $id, $delete_action, $redirect );
2188
2189
		//take care of contents
2190
		$this->_template_args['admin_page_content'] = $this->_category_details_content();
2191
		$this->display_admin_page_with_sidebar();
2192
	}
2193
2194
2195