Code Duplication    Length = 15-16 lines in 2 locations

admin_pages/venues/Venues_Admin_Page.core.php 1 location

@@ 1326-1340 (lines=15) @@
1323
1324
1325
1326
	protected function _insert_or_update_category($new_category) {
1327
1328
		$cat_id = $new_category ? $this->_insert_category() : $this->_insert_category( TRUE );
1329
		$success = 0; //we already have a success message so lets not send another.
1330
		if ( $cat_id ) {
1331
			$query_args = array(
1332
				'action'     => 'edit_category',
1333
				'VEN_CAT_ID' => $cat_id
1334
			);
1335
		} else {
1336
			$query_args = array( 'action' => 'add_category' );
1337
		}
1338
		$this->_redirect_after_action( $success, '','', $query_args, TRUE );
1339
1340
	}
1341
1342
1343

admin_pages/events/Events_Admin_Page.core.php 1 location

@@ 2267-2282 (lines=16) @@
2264
2265
2266
2267
	protected function _insert_or_update_category($new_category) {
2268
2269
		$cat_id = $new_category ? $this->_insert_category() : $this->_insert_category( TRUE );
2270
		$success = 0; //we already have a success message so lets not send another.
2271
2272
		if ( $cat_id ) {
2273
			$query_args = array(
2274
				'action'     => 'edit_category',
2275
				'EVT_CAT_ID' => $cat_id
2276
			);
2277
		} else {
2278
			$query_args = array( 'action' => 'add_category' );
2279
		}
2280
		$this->_redirect_after_action( $success, '','', $query_args, TRUE );
2281
2282
	}
2283
2284
2285