Code Duplication    Length = 4-4 lines in 2 locations

json-endpoints/class.wpcom-json-api-post-endpoint.php 1 location

@@ 128-131 (lines=4) @@
125
			}
126
		}
127
128
		if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'wp-windows8' ) ) {
129
			remove_shortcode( 'gallery', 'gallery_shortcode' );
130
			add_shortcode( 'gallery', array( &$this, 'win8_gallery_shortcode' ) );
131
		}
132
133
		switch ( $field ) {
134
		case 'name' :

json-endpoints/class.wpcom-json-api-post-v1-1-endpoint.php 1 location

@@ 95-98 (lines=4) @@
92
			}
93
		}
94
95
		if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'wp-windows8' ) ) {
96
			remove_shortcode( 'gallery', 'gallery_shortcode' );
97
			add_shortcode( 'gallery', array( &$this, 'win8_gallery_shortcode' ) );
98
		}
99
100
		// fetch SAL post
101
		$post = $this->get_sal_post_by( $field, $field_value, $context );