Code Duplication    Length = 8-9 lines in 2 locations

admin_pages/events/Events_Admin_Page.core.php 2 locations

@@ 613-620 (lines=8) @@
610
		}
611
		//made it here so it IS active... next check that any of the tickets are sold.
612
		if ( $event->is_sold_out( true ) ) {
613
			if ( $orig_status !== EEM_Event::sold_out && $event->status() !== $orig_status ) {
614
				EE_Error::add_attention(
615
					sprintf(
616
						__( 'Please note that the Event Status has automatically been changed to %s because there are no more spaces available for this event.  However, this change is not permanent until you update the event.  You can change the status back to something else before updating if you wish.', 'event_espresso' ),
617
						EEH_Template::pretty_status( EEM_Event::sold_out, FALSE, 'sentence' )
618
					)
619
				);
620
			}
621
			return;
622
		} else if ( $orig_status === EEM_Event::sold_out ) {
623
			EE_Error::add_attention(
@@ 622-630 (lines=9) @@
619
				);
620
			}
621
			return;
622
		} else if ( $orig_status === EEM_Event::sold_out ) {
623
			EE_Error::add_attention(
624
				sprintf(
625
					__( 'Please note that the Event Status has automatically been changed to %s because more spaces have become available for this event, most likely due to abandoned transactions freeing up reserved tickets.  However, this change is not permanent until you update the event. If you wish, you can change the status back to something else before updating.',
626
						'event_espresso' ),
627
					EEH_Template::pretty_status( $event->status(), false, 'sentence' )
628
				)
629
			);
630
		}
631
		//now we need to determine if the event has any tickets on sale.  If not then we dont' show the error
632
		if ( ! $event->tickets_on_sale() ) {
633
			return;