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

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