Code Duplication    Length = 8-9 lines in 2 locations

admin_pages/events/Events_Admin_Page.core.php 2 locations

@@ 615-622 (lines=8) @@
612
		}
613
		//made it here so it IS active... next check that any of the tickets are sold.
614
		if ( $event->is_sold_out( true ) ) {
615
			if ( $orig_status !== EEM_Event::sold_out && $event->status() !== $orig_status ) {
616
				EE_Error::add_attention(
617
					sprintf(
618
						__( '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' ),
619
						EEH_Template::pretty_status( EEM_Event::sold_out, FALSE, 'sentence' )
620
					)
621
				);
622
			}
623
			return;
624
		} else if ( $orig_status === EEM_Event::sold_out ) {
625
			EE_Error::add_attention(
@@ 624-632 (lines=9) @@
621
				);
622
			}
623
			return;
624
		} else if ( $orig_status === EEM_Event::sold_out ) {
625
			EE_Error::add_attention(
626
				sprintf(
627
					__( '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.',
628
						'event_espresso' ),
629
					EEH_Template::pretty_status( $event->status(), false, 'sentence' )
630
				)
631
			);
632
		}
633
		//now we need to determine if the event has any tickets on sale.  If not then we dont' show the error
634
		if ( ! $event->tickets_on_sale() ) {
635
			return;