Code Duplication    Length = 5-6 lines in 2 locations

caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php 1 location

@@ 391-395 (lines=5) @@
388
389
390
			//if this is a default TKT, then we need to set the TKT_ID to 0 and update accordingly, which means in turn that the prices will become new prices as well.
391
			if ( isset( $tkt['TKT_is_default'] ) && $tkt['TKT_is_default'] ) {
392
				$TKT_values['TKT_ID'] = 0;
393
				$TKT_values['TKT_is_default'] = 0;
394
				$update_prices = TRUE;
395
			}
396
397
			// if we have a TKT_ID then we need to get that existing TKT_obj and update it
398
			// we actually do our saves ahead of doing any add_relations to

admin_pages/events/Events_Admin_Page.core.php 1 location

@@ 1050-1055 (lines=6) @@
1047
1048
1049
			//if this is a default TKT, then we need to set the TKT_ID to 0 and update accordingly, which means in turn that the prices will become new prices as well.
1050
			if ( isset( $tkt['TKT_is_default'] ) && $tkt['TKT_is_default'] ) {
1051
				$TKT_values['TKT_ID'] = 0;
1052
				$TKT_values['TKT_is_default'] = 0;
1053
				$TKT_values['TKT_price'] = $ticket_price;
1054
				$update_prices = TRUE;
1055
			}
1056
1057
			//if we have a TKT_ID then we need to get that existing TKT_obj and update it
1058
			//we actually do our saves a head of doing any add_relations to because its entirely possible that this ticket didn't removed or added to any datetime in the session but DID have it's items modified.