Code Duplication    Length = 10-11 lines in 2 locations

class.jetpack.php 2 locations

@@ 2983-2992 (lines=10) @@
2980
2981
			if ( $send_state_messages && in_array( $module, $active ) ) {
2982
				$module_info = self::get_module( $module );
2983
				if ( ! $module_info['deactivate'] ) {
2984
					$state = in_array( $module, $other_modules ) ? 'reactivated_modules' : 'activated_modules';
2985
					if ( $active_state = self::state( $state ) ) {
2986
						$active_state = explode( ',', $active_state );
2987
					} else {
2988
						$active_state = array();
2989
					}
2990
					$active_state[] = $module;
2991
					self::state( $state, implode( ',', $active_state ) );
2992
				}
2993
				continue;
2994
			}
2995
@@ 3016-3026 (lines=11) @@
3013
3014
			$active[] = $module;
3015
3016
			if ( $send_state_messages ) {
3017
3018
				$state = in_array( $module, $other_modules ) ? 'reactivated_modules' : 'activated_modules';
3019
				if ( $active_state = self::state( $state ) ) {
3020
					$active_state = explode( ',', $active_state );
3021
				} else {
3022
					$active_state = array();
3023
				}
3024
				$active_state[] = $module;
3025
				self::state( $state, implode( ',', $active_state ) );
3026
			}
3027
3028
			self::update_active_modules( $active );
3029